s=input()
odd=["R","U","D"]
even=["L","U","D"]
ans="Yes"

for i in range(len(s)):
    if  i%2==0:
        if s[i] not in odd:
            ans="No"
    else:
        if s[i] not in even:
            ans="No"

print(ans) 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" ans="Yes" ans "Yes" for i in range(len(s)):
    if  i%2==0:
        if s[i] not in odd:
            ans="No"
    else:
        if s[i] not in even:
            ans="No" i range(len(s)) range len(s) len s if  i%2==0:
        if s[i] not in odd:
            ans="No"
    else:
        if s[i] not in even:
            ans="No" i%2==0 i%2 i 2 0 if s[i] not in odd:
            ans="No"
     s[i] not in odd s[i] s i odd ans="No" ans "No" if s[i] not in even:
            ans="No" s[i] not in even s[i] s i even ans="No" ans "No" print(ans) print ans s=input() input() s ans="No" "No" ans odd=["R","U","D"] ["R","U","D"] odd ans="No" "No" ans even=["L","U","D"] ["L","U","D"] even ans="Yes" "Yes" ans
s=input()
odd=["R","U","D"]
even=["L","U","D"]
ans="Yes"

for i in range(len(s)):
    if  i%2==0:
        if s[i] not in odd:
            ans="No"
    else:
        if s[i] not in even:
            ans="No"

print(ans)