S=input()

def ans141(S:str):
    judge=0

    for i in range(0,len(S)):
        if (i+1)%2==1:
            if S[i]=="R" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
        else:
            if S[i]=="L" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
    if judge>0:
        return "No"
    else:
        return "Yes"

print(ans141(S)) S=input() S input() input def ans141(S:str):
    judge=0

    for i in range(0,len(S)):
        if (i+1)%2==1:
            if S[i]=="R" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
        else:
            if S[i]=="L" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
    if judge>0:
        return "No"
    else:
        return "Yes" ans141 judge=0 judge 0 for i in range(0,len(S)):
        if (i+1)%2==1:
            if S[i]=="R" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
        else:
            if S[i]=="L" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
     i range(0,len(S)) range 0 len(S) len S if (i+1)%2==1:
            if S[i]=="R" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
        else:
            if S[i]=="L" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
     (i+1)%2==1 (i+1)%2 i+1 i 1 2 1 if S[i]=="R" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
         S[i]=="R" or S[i]=="U" or S[i]=="D" S[i]=="R" or S[i]=="U" S[i]=="R" S[i] S i "R" S[i]=="U" S[i] S i "U" S[i]=="D" S[i] S i "D" continue judge+=1 judge 1 if S[i]=="L" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
     S[i]=="L" or S[i]=="U" or S[i]=="D" S[i]=="L" or S[i]=="U" S[i]=="L" S[i] S i "L" S[i]=="U" S[i] S i "U" S[i]=="D" S[i] S i "D" continue judge+=1 judge 1 if judge>0:
        return "No"
    else:
        return "Yes" judge>0 judge 0 return "No" "No" return "Yes" "Yes" S:str S print(ans141(S)) print ans141(S) ans141 S S=input() input() S def ans141(S:str):
    judge=0

    for i in range(0,len(S)):
        if (i+1)%2==1:
            if S[i]=="R" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
        else:
            if S[i]=="L" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
    if judge>0:
        return "No"
    else:
        return "Yes" def ans141(S:str):
    judge=0

    for i in range(0,len(S)):
        if (i+1)%2==1:
            if S[i]=="R" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
        else:
            if S[i]=="L" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
    if judge>0:
        return "No"
    else:
        return "Yes" ans141
S=input()

def ans141(S:str):
    judge=0

    for i in range(0,len(S)):
        if (i+1)%2==1:
            if S[i]=="R" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
        else:
            if S[i]=="L" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
    if judge>0:
        return "No"
    else:
        return "Yes"

print(ans141(S))