s=input()
count=1
ans='Yes'
for i in s:
    if count%2==1:
        if i=='R' or i=='U' or i=='D':
            count+=1
            continue
        else:
            ans='No'
            break
    else:
        if i=='L' or i=='U' or i=='D':
            count+=1
            continue
        else:
            ans='No'
            break
print(ans) s=input() s input() input count=1 count 1 ans='Yes' ans 'Yes' for i in s:
    if count%2==1:
        if i=='R' or i=='U' or i=='D':
            count+=1
            continue
        else:
            ans='No'
            break
    else:
        if i=='L' or i=='U' or i=='D':
            count+=1
            continue
        else:
            ans='No'
            break i s if count%2==1:
        if i=='R' or i=='U' or i=='D':
            count+=1
            continue
        else:
            ans='No'
            break
    else:
        if i=='L' or i=='U' or i=='D':
            count+=1
            continue
        else:
            ans='No'
            break count%2==1 count%2 count 2 1 if i=='R' or i=='U' or i=='D':
            count+=1
            continue
        else:
            ans='No'
            break
     i=='R' or i=='U' or i=='D' i=='R' or i=='U' i=='R' i 'R' i=='U' i 'U' i=='D' i 'D' count+=1 count 1 continue ans='No' ans 'No' break if i=='L' or i=='U' or i=='D':
            count+=1
            continue
        else:
            ans='No'
            break i=='L' or i=='U' or i=='D' i=='L' or i=='U' i=='L' i 'L' i=='U' i 'U' i=='D' i 'D' count+=1 count 1 continue ans='No' ans 'No' break print(ans) print ans s=input() input() s count+=1 1 count ans='No' 'No' ans ans='Yes' 'Yes' ans count+=1 1 count ans='No' 'No' ans count=1 1 count
s=input()
count=1
ans='Yes'
for i in s:
    if count%2==1:
        if i=='R' or i=='U' or i=='D':
            count+=1
            continue
        else:
            ans='No'
            break
    else:
        if i=='L' or i=='U' or i=='D':
            count+=1
            continue
        else:
            ans='No'
            break
print(ans)
