s = input()
ans = 'Yes'
for i in range(len(s)):
    if i%2 and not(s[i] in 'LUD'):
        ans = 'No'
        break
    if not(i%2) and not(s[i] in 'RUD'):
        ans = 'No'
        break
print(ans) s = input() s input() input ans = 'Yes' ans 'Yes' for i in range(len(s)):
    if i%2 and not(s[i] in 'LUD'):
        ans = 'No'
        break
    if not(i%2) and not(s[i] in 'RUD'):
        ans = 'No'
        break i range(len(s)) range len(s) len s if i%2 and not(s[i] in 'LUD'):
        ans = 'No'
        break
     i%2 and not(s[i] in 'LUD') i%2 i 2 not(s[i] in 'LUD') s[i] in 'LUD' s[i] s i 'LUD' ans = 'No' ans 'No' break if not(i%2) and not(s[i] in 'RUD'):
        ans = 'No'
        break not(i%2) and not(s[i] in 'RUD') not(i%2) i%2 i 2 not(s[i] in 'RUD') s[i] in 'RUD' s[i] s i 'RUD' ans = 'No' ans 'No' break print(ans) print ans ans = 'No' 'No' ans s = input() input() s ans = 'No' 'No' ans ans = 'Yes' 'Yes' ans
s = input()
ans = 'Yes'
for i in range(len(s)):
    if i%2 and not(s[i] in 'LUD'):
        ans = 'No'
        break
    if not(i%2) and not(s[i] in 'RUD'):
        ans = 'No'
        break
print(ans)
