S=input()
for i in range(len(S)):
    if i%2==0:
        if S[i] not in "RUD":
            print("No")
            break
    else:
        if S[i] not in "LUD":
            print("No")
            break
else:
    print("Yes") S=input() S input() input for i in range(len(S)):
    if i%2==0:
        if S[i] not in "RUD":
            print("No")
            break
    else:
        if S[i] not in "LUD":
            print("No")
            break
else:
    print("Yes") i range(len(S)) range len(S) len S if i%2==0:
        if S[i] not in "RUD":
            print("No")
            break
    else:
        if S[i] not in "LUD":
            print("No")
            break i%2==0 i%2 i 2 0 if S[i] not in "RUD":
            print("No")
            break
     S[i] not in "RUD" S[i] S i "RUD" print("No") print "No" break if S[i] not in "LUD":
            print("No")
            break S[i] not in "LUD" S[i] S i "LUD" print("No") print "No" break print("Yes") print "Yes" S=input() input() S
S=input()
for i in range(len(S)):
    if i%2==0:
        if S[i] not in "RUD":
            print("No")
            break
    else:
        if S[i] not in "LUD":
            print("No")
            break
else:
    print("Yes")
