S=input()

ans='Yes'
for i in range(len(S)):
  if (i%2==1) and (S[i] not in {'L','U','D'}):ans='No'
  if (i%2==0) and (S[i] not in {'R','U','D'}):ans='No'
print(ans)
d399ad24cad4b16799ceba924e3e40c3b6a9867d
<mask token>

<mask token>
for i in range(len(S)):
    if i % 2 == 1 and S[i] not in {'L', 'U', 'D'}:
        ans = 'No'
    if i % 2 == 0 and S[i] not in {'R', 'U', 'D'}:
        ans = 'No'
print(ans)

S = input()
ans = 'Yes'
for i in range(len(S)):
    if i % 2 == 1 and S[i] not in {'L', 'U', 'D'}:
        ans = 'No'
    if i % 2 == 0 and S[i] not in {'R', 'U', 'D'}:
        ans = 'No'
print(ans)

S=input()

ans='Yes'
for i in range(len(S)):
  if (i%2==1) and (S[i] not in {'L','U','D'}):ans='No'
  if (i%2==0) and (S[i] not in {'R','U','D'}):ans='No'
print(ans)