s = input()

howmany = len(s)
judge = "Yes"

for x in range(howmany):
  if x % 2 == 0:
    if s[x] != "R" and s[x] != "U" and s[x] != "D":
      judge = "No"
      break
  else:
    if s[x] != "L" and s[x] != "U" and s[x] != "D":
      judge = "No"
      break
      
print(judge) s = input() s input() input howmany = len(s) howmany len(s) len s judge = "Yes" judge "Yes" for x in range(howmany):
  if x % 2 == 0:
    if s[x] != "R" and s[x] != "U" and s[x] != "D":
      judge = "No"
      break
  else:
    if s[x] != "L" and s[x] != "U" and s[x] != "D":
      judge = "No"
      break
       x range(howmany) range howmany if x % 2 == 0:
    if s[x] != "R" and s[x] != "U" and s[x] != "D":
      judge = "No"
      break
  else:
    if s[x] != "L" and s[x] != "U" and s[x] != "D":
      judge = "No"
      break
       x % 2 == 0 x % 2 x 2 0 if s[x] != "R" and s[x] != "U" and s[x] != "D":
      judge = "No"
      break
   s[x] != "R" and s[x] != "U" and s[x] != "D" s[x] != "R" and s[x] != "U" s[x] != "R" s[x] s x "R" s[x] != "U" s[x] s x "U" s[x] != "D" s[x] s x "D" judge = "No" judge "No" break if s[x] != "L" and s[x] != "U" and s[x] != "D":
      judge = "No"
      break
       s[x] != "L" and s[x] != "U" and s[x] != "D" s[x] != "L" and s[x] != "U" s[x] != "L" s[x] s x "L" s[x] != "U" s[x] s x "U" s[x] != "D" s[x] s x "D" judge = "No" judge "No" break print(judge) print judge judge = "No" "No" judge s = input() input() s judge = "Yes" "Yes" judge howmany = len(s) len(s) howmany judge = "No" "No" judge
s = input()

howmany = len(s)
judge = "Yes"

for x in range(howmany):
  if x % 2 == 0:
    if s[x] != "R" and s[x] != "U" and s[x] != "D":
      judge = "No"
      break
  else:
    if s[x] != "L" and s[x] != "U" and s[x] != "D":
      judge = "No"
      break
      
print(judge)