s = input()
odd = ["R","U","D"]
even = ["L","U","D"]
res = "Yes"
for i in range(len(s)):
    if i%2 == 0 and s[i] not in odd: res = "No"
    elif i%2==1 and s[i] not in even:res="No"
print(res) s = input() s input() input odd = ["R","U","D"] odd ["R","U","D"] "R" "U" "D" even = ["L","U","D"] even ["L","U","D"] "L" "U" "D" res = "Yes" res "Yes" for i in range(len(s)):
    if i%2 == 0 and s[i] not in odd: res = "No"
    elif i%2==1 and s[i] not in even:res="No" i range(len(s)) range len(s) len s if i%2 == 0 and s[i] not in odd: res = "No"
    elif i%2==1 and s[i] not in even:res="No" i%2 == 0 and s[i] not in odd i%2 == 0 i%2 i 2 0 s[i] not in odd s[i] s i odd elif i%2==1 and s[i] not in even:res= i%2==1 and s[i] not in even i%2==1 i%2 i 2 1 s[i] not in even s[i] s i even print(res) print res s = input() input() s even = ["L","U","D"] ["L","U","D"] even res = "Yes" "Yes" res odd = ["R","U","D"] ["R","U","D"] odd
s = input()
odd = ["R","U","D"]
even = ["L","U","D"]
res = "Yes"
for i in range(len(s)):
    if i%2 == 0 and s[i] not in odd: res = "No"
    elif i%2==1 and s[i] not in even:res="No"
print(res)