s = list(input())
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']
ret = 'Yes'
for i, j in enumerate(s):
    if (i+1)%2 == 1 and j not in odd:
        ret = 'No'
        break
    elif (i+1)%2 == 0 and j not in even:
        ret = 'No'
        break
print(ret) s = list(input()) s list(input()) list input() input odd = ['R', 'U', 'D'] odd ['R', 'U', 'D'] 'R' 'U' 'D' even = ['L', 'U', 'D'] even ['L', 'U', 'D'] 'L' 'U' 'D' ret = 'Yes' ret 'Yes' for i, j in enumerate(s):
    if (i+1)%2 == 1 and j not in odd:
        ret = 'No'
        break
    elif (i+1)%2 == 0 and j not in even:
        ret = 'No'
        break i j enumerate(s) enumerate s if (i+1)%2 == 1 and j not in odd:
        ret = 'No'
        break
    elif (i+1)%2 == 0 and j not in even:
        ret = 'No'
        break (i+1)%2 == 1 and j not in odd (i+1)%2 == 1 (i+1)%2 i+1 i 1 2 1 j not in odd j odd ret = 'No' ret 'No' break elif (i+1)%2 == 0 and j not in even:
        ret = 'No'
        break (i+1)%2 == 0 and j not in even (i+1)%2 == 0 (i+1)%2 i+1 i 1 2 0 j not in even j even ret = 'No' ret 'No' break print(ret) print ret even = ['L', 'U', 'D'] ['L', 'U', 'D'] even odd = ['R', 'U', 'D'] ['R', 'U', 'D'] odd ret = 'No' 'No' ret ret = 'No' 'No' ret ret = 'Yes' 'Yes' ret s = list(input()) list(input()) s
s = list(input())
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']
ret = 'Yes'
for i, j in enumerate(s):
    if (i+1)%2 == 1 and j not in odd:
        ret = 'No'
        break
    elif (i+1)%2 == 0 and j not in even:
        ret = 'No'
        break
print(ret)