s = input()
ans = 'Yes'
for i,k in enumerate(s):
  num = i + 1
  if num % 2 == 0 and k not in set('LUD'):
    ans = 'No'
    break
  if num % 2 == 1 and k not in set('RUD'):
    ans = 'No'
    break
print(ans) s = input() s input() input ans = 'Yes' ans 'Yes' for i,k in enumerate(s):
  num = i + 1
  if num % 2 == 0 and k not in set('LUD'):
    ans = 'No'
    break
  if num % 2 == 1 and k not in set('RUD'):
    ans = 'No'
    break i k enumerate(s) enumerate s num = i + 1 num i + 1 i 1 if num % 2 == 0 and k not in set('LUD'):
    ans = 'No'
    break
   num % 2 == 0 and k not in set('LUD') num % 2 == 0 num % 2 num 2 0 k not in set('LUD') k set('LUD') set 'LUD' ans = 'No' ans 'No' break if num % 2 == 1 and k not in set('RUD'):
    ans = 'No'
    break num % 2 == 1 and k not in set('RUD') num % 2 == 1 num % 2 num 2 1 k not in set('RUD') k set('RUD') set 'RUD' ans = 'No' ans 'No' break print(ans) print ans s = input() input() s ans = 'No' 'No' ans num = i + 1 i + 1 num ans = 'Yes' 'Yes' ans ans = 'No' 'No' ans
s = input()
ans = 'Yes'
for i,k in enumerate(s):
  num = i + 1
  if num % 2 == 0 and k not in set('LUD'):
    ans = 'No'
    break
  if num % 2 == 1 and k not in set('RUD'):
    ans = 'No'
    break
print(ans)