s = [c for c in input()]
result = 'Yes'
for index, step in enumerate(s, start=1):
    if index % 2 == 1:
        if step not in "RUD":
            result = 'No'
            break
    else:
        if step not in "LUD":
            result = 'No'
            break

print(result) c for c in input() for c in input() c input() input for c in input() c s = [c for c in input()] s [c for c in input()] result = 'Yes' result 'Yes' for index, step in enumerate(s, start=1):
    if index % 2 == 1:
        if step not in "RUD":
            result = 'No'
            break
    else:
        if step not in "LUD":
            result = 'No'
            break index step enumerate(s, start=1) enumerate s start=1 start 1 if index % 2 == 1:
        if step not in "RUD":
            result = 'No'
            break
    else:
        if step not in "LUD":
            result = 'No'
            break index % 2 == 1 index % 2 index 2 1 if step not in "RUD":
            result = 'No'
            break
     step not in "RUD" step "RUD" result = 'No' result 'No' break if step not in "LUD":
            result = 'No'
            break step not in "LUD" step "LUD" result = 'No' result 'No' break print(result) print result result = 'No' 'No' result result = 'No' 'No' result result = 'Yes' 'Yes' result s = [c for c in input()] [c for c in input()] s
s = [c for c in input()]
result = 'Yes'
for index, step in enumerate(s, start=1):
    if index % 2 == 1:
        if step not in "RUD":
            result = 'No'
            break
    else:
        if step not in "LUD":
            result = 'No'
            break

print(result)
