s = input()
ans = 'Yes'
for index, value in enumerate(s):
    if (index + 1)%2 == 0 and value not in ['L', 'U', 'D']:
        ans = 'No'
    elif (index + 1)%2 != 0 and value not in ['R', 'U', 'D']:
        ans = 'No'
        
print(ans) s = input() s input() input ans = 'Yes' ans 'Yes' for index, value in enumerate(s):
    if (index + 1)%2 == 0 and value not in ['L', 'U', 'D']:
        ans = 'No'
    elif (index + 1)%2 != 0 and value not in ['R', 'U', 'D']:
        ans = 'No'
         index value enumerate(s) enumerate s if (index + 1)%2 == 0 and value not in ['L', 'U', 'D']:
        ans = 'No'
    elif (index + 1)%2 != 0 and value not in ['R', 'U', 'D']:
        ans = 'No'
         (index + 1)%2 == 0 and value not in ['L', 'U', 'D'] (index + 1)%2 == 0 (index + 1)%2 index + 1 index 1 2 0 value not in ['L', 'U', 'D'] value ['L', 'U', 'D'] 'L' 'U' 'D' ans = 'No' ans 'No' elif (index + 1)%2 != 0 and value not in ['R', 'U', 'D']:
        ans = 'No'
         (index + 1)%2 != 0 and value not in ['R', 'U', 'D'] (index + 1)%2 != 0 (index + 1)%2 index + 1 index 1 2 0 value not in ['R', 'U', 'D'] value ['R', 'U', 'D'] 'R' 'U' 'D' ans = 'No' ans 'No' print(ans) print ans ans = 'Yes' 'Yes' ans ans = 'No' 'No' ans ans = 'No' 'No' ans s = input() input() s
s = input()
ans = 'Yes'
for index, value in enumerate(s):
    if (index + 1)%2 == 0 and value not in ['L', 'U', 'D']:
        ans = 'No'
    elif (index + 1)%2 != 0 and value not in ['R', 'U', 'D']:
        ans = 'No'
        
print(ans)