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() S input() input ans='Yes' 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' i range(len(S)) range len(S) len S if (i%2==1) and (S[i] not in {'L','U','D'}):ans='No'
   (i%2==1) and (S[i] not in {'L','U','D'}) i%2==1 i%2 i 2 1 S[i] not in {'L','U','D'} S[i] S i {'L','U','D'} if (i%2==0) and (S[i] not in {'R','U','D'}):ans='N (i%2==0) and (S[i] not in {'R','U','D'}) i%2==0 i%2 i 2 0 S[i] not in {'R','U','D'} S[i] S i {'R','U','D'} print(ans) print ans ans='Yes' 'Yes' ans S=input() input() S
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)