Takahashi will do a tap dance. The dance is described by a string S where each character is L, R, U, or D. These characters indicate the positions on which Takahashi should step. He will follow these instructions one by one in order, starting with the first character.
S is said to be easily playable if and only if it satisfies both of the following conditions:
 - Every character in an odd position (1-st, 3-rd, 5-th, \ldots) is R, U, or D.
 - Every character in an even position (2-nd, 4-th, 6-th, \ldots) is L, U, or D.
Your task is to print Yes if S is easily playable, and No otherwise.

-----Constraints-----
 - S is a string of length between 1 and 100 (inclusive).
 - Each character of S is L, R, U, or D.

-----Input-----
Input is given from Standard Input in the following format:
S

-----Output-----
Print Yes if S is easily playable, and No otherwise.

-----Sample Input-----
RUDLUDR

-----Sample Output-----
Yes

Every character in an odd position (1-st, 3-rd, 5-th, 7-th) is R, U, or D.
Every character in an even position (2-nd, 4-th, 6-th) is L, U, or D.
Thus, S is easily playable.

Difficulty: introductory

Starter code:

Solutions:
# 高橋君はタップダンスをすることにしました。タップダンスの動きは文字列 S で表され、 S の各文字は L, R, U, D のいずれかです。
# 各文字は足を置く位置を表しており、 1 文字目から順番に踏んでいきます。 S が以下の 2 条件を満たすとき、またその時に限り、 S を「踏みやすい」文字列といいます。
# 奇数文字目がすべて R, U, D のいずれか。 偶数文字目がすべて L, U, D のいずれか。 S が「踏みやすい」文字列なら Yes を、そうでなければ No を出力してください。


S = str(input())

if 'L' in S[0::2] or 'R' in S[1::2]:
        print('No')

else:
    print('Yes')

s = input()
ans = 1
for i in range(len(s)):
    if (i+1)&1:
        if s[i] not in "RUD":
            ans = 0
    else:
        if s[i] not in "LUD":
            ans = 0
print("Yes" if ans==1 else "No")

import re

string = input()
pattern = re.compile(r'^([^L][^R])*[^L]?$')
if pattern.match(string):
    print('Yes')
else:
    print('No')

s=input()
check=True
for i in range(len(s)):
  if i%2==0 and s[i] not in ["R","U","D"]:
    check=False
  elif i%2==1 and s[i] not in ["L","U","D"]:
    check=False
print("Yes" if check else "No")

S = str(input())
even_list = list(S)
odd_list = []

n = 0


for i in even_list:
    add_odd = even_list.pop(n)
    odd_list.append(add_odd)
    n += 1
# 
# print(odd_list)
# print(even_list)

if "R" in even_list:
    print("No")
elif "L" in odd_list:
    print("No")
else:
    print("Yes")

s = input()
print('Yes' if all(c in 'RUD' for c in s[::2]) and all(c in 'LUD' for c in s[1::2]) else 'No')

def resolve():
    s = input()
    step_odd = 'RUD'
    step_even = 'LUD'
    ans = 'Yes'
    for i,j in enumerate(s):
        if i%2==0 and j not in step_odd:
            ans = 'No'
        elif i%2!=0 and j not in step_even:
            ans = 'No'
        else:
            pass
    print(ans)
resolve()

s = input()
for i, si in enumerate(s):
  if si in ['U', 'D']:
    continue
  if i % 2 == 1 and si == 'L':
    continue
  if i % 2 == 0 and si == 'R':
    continue
  print('No')
  return
print('Yes')


S = input()
print(['Yes', 'No']['L' in S[::2] or 'R' in S[1::2]])

for i,s in enumerate(input(),start=1):
  if i%2==0:
    if s=='R':
      print('No')
      return
  else:
    if s=='L':
      print('No')
      return
print('Yes')

S = input()

ans = 'Yes'
for i in range(len(S)):
    
    if i % 2 == 0:
        if 'L' in S[i]:
            ans = 'No'
    else:
        if 'R' in S[i]:
            ans = 'No'
            
print(ans)

s = input()
n = len(s)

ans = 'Yes'

for i in range(n):
    if i%2 == 0 and s[i] == 'L': ans = 'No'
    if i%2 != 0 and s[i] == 'R': ans = 'No'

print(ans)

string = input()
main = []
for index, char in enumerate(string):
    if (index + 1) % 2 == 1:
        if char not in 'RUD':
            main.append('No')
    else:
        if char not in 'LUD':
            main.append('No')
            
main.append('Yes')
print((main[0]))


S=input()

def ans141(S:str):
    judge=0

    for i in range(0,len(S)):
        if (i+1)%2==1:
            if S[i]=="R" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
        elif (i+1)%2==0:
            if S[i]=="L" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
    if judge>0:
        return "No"
    else:
        return "Yes"

print(ans141(S))

s = input()
if "L" in s[0::2] or "R" in s[1::2]:
  print("No")
else:
  print("Yes")

S = list(input())

odd = ["R", "U", "D"]
even = ["L", "U", "D"]
ans = "Yes"

for i, s in enumerate(S):
  if i%2==0 and s not in odd:
    ans = "No"
    break
  elif i%2==1 and s not in even:
    ans = "No"
    break

print(ans)

s = input()
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] == 'L':
            print('No')
            return
    else:
        if s[i] == 'R':
            print('No')
            return
print('Yes')


s=input()
ok=0
for i in range(len(s)):
    if(i%2==0 and s[i]=='L'):
        ok+=1
    if(i%2==1 and s[i]=='R'):
        ok+=1
if(ok==0):
    print("Yes")
else:
    print('No')

S = str(input())

odd = list(S[0::2])
even = list(S[1::2])

if all([n == "R" or n == "U" or n == "D" for n in odd]) and all([n == "L" or n == "U" or n == "D" for n in even]):
    print("Yes")
else:
    print("No")


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()
ok = 1
for i in range(len(S)):
    if i % 2 == 1 and S[i] == 'R':
        ok = 0
    if i % 2 == 0 and S[i] == 'L':
        ok = 0
print(('Yes' if ok else 'No'))


s = input()
s1 = set(s[::2]) - set('RUD')
s2 = set(s[1::2]) - set('LUD')
if s1 or s2:
    print('No')
else:
    print('Yes')

S = input()
flag = True
for i, value in enumerate(S):
    if i % 2 == 1:
        if value == 'R':
            flag = False
    else:
        if value == 'L':
            flag = False
if flag:
    print("Yes")
else:
    print("No")

S = input()

a = {'R', 'U', 'D'}
b = {'L', 'U', 'D'}
Odd = set(S[0::2])
Even = set(S[1::2])

if Even <= b and Odd <= a:
    print('Yes')
else:
    print('No')

S = input()

s = list(S)

odd_list = s[0::2]
even_list = s[1::2]

if 'L' in odd_list or 'R' in even_list:
    print('No')

else:
    print('Yes')

s = [i for i in input()]
s_len = len(s)
list1 = []
list2 = []
for j in range(0, s_len, 2):
    for even in s[j]:
        list1.append(even in ['R', 'U', 'D'])
for k in range(1, s_len, 2):
    for odd in s[k]:
        list2.append(odd in ['L', 'U', 'D'])

if False in list1:
    print('No')
elif False in list2:
    print('No')
else:
    print('Yes')


word = input()
odd_v = ['R', 'U', 'D']
odd_list = []
even_v = ['L', 'U', 'D']
even_list = []

for index, i in enumerate(word, 1):
    if index % 2 == 1:
        odd_list.append(i)
    else:
        even_list.append(i)

if set(odd_list).issubset(odd_v) and set(even_list).issubset(even_v):
    print('Yes')
else:
    print('No')

S = input()
cnt = 0
for i in range(0, len(S)):
    if i % 2 == 0:  # 奇数文字目
        if S[i] in ['R', 'U', 'D']:
            cnt += 1
    else:  # 偶数文字目
        if S[i] in ['L', 'U', 'D']:
            cnt += 1
if cnt == len(S):
    print('Yes')
else:
    print('No')

S = list(input())
ans = True
for i in range(len(S)):
  if i % 2 != 0:
    if S[i] != "L" and S[i] != "U" and  S[i] != "D":
      ans = False
  else:
    if S[i] != "R" and S[i] != "U" and S[i] != "D":
      ans = False
if ans:
  print("Yes")
else:
  print("No")

#偶数と奇数配列に分ける
#奇数番配列にLが存在するかで条件分岐
#偶数番配列にRが存在するかで条件分岐
S = input()
Odd = S[::2]
Even = S[1::2]
print('Yes' if Odd.count('L') == 0 and Even.count('R') == 0 else 'No')

s=input();print('YNeos'['L'in s[::2] or'R'in s[1::2]::2])

s = input()

count = 0
for i in range(len(s)):
    if i % 2 == 0 and s[i] == "L":
        count += 1
    if i % 2 == 1 and s[i] == "R":
        count += 1

if count > 0:
    print("No")
else:
    print("Yes")

s = input()
o = ['R','U','D']
e = ['L','U','D']
ans = 'Yes'
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] not in o:
            ans = 'No'
    else:
        if s[i] not in e:
            ans = 'No'
print(ans)

s = input()

odd_s = list(s[0::2])
even_s = list(s[1::2])

to = ['R', 'U', 'D']
te = ['L', 'U', 'D']

if set(odd_s).issubset(to) and set(even_s).issubset(te):
    print('Yes')
else:
    print('No')


S = str(input())

answer = 'Yes'
for i in range(len(S)):
    j = i + 1
    if j % 2 == 0:
        if S[i] == 'R':
            answer = 'No'
    else:
        if S[i] == 'L':
            answer = 'No'

print(answer)

s=input()
count=0

for i in range(0,len(s)):
    if i%2==0 and s[i]=="L":
        print("No")
        count=1
        break
    elif i%2==1 and s[i]=="R":
        print("No")
        count=1
        break

if count==0:
    print("Yes")

s=input()
odd=["R","U","D"]
even=["L","U","D"]
ans="Yes"

for i in range(len(s)):
    if  i%2==0:
        if s[i] not in odd:
            ans="No"
    else:
        if s[i] not in even:
            ans="No"

print(ans)

s=list(input())
kisu=s[::2]
gusu=s[1::2]
flag=0
for e in kisu:
    if e =="R" or e=="U" or e=="D":
        flag+=1
for e in gusu:
    if e =="L" or e=="U" or e=="D":
        flag+=1
if flag==len(s):
    print("Yes")
else:
    print("No")

s = input()
a = 0
for i in range(0, len(s), 2):
    if s[i] == 'L':
        a += 1
for j in range(1, len(s), 2):
    if s[j] == 'R':
        a += 1
if a == 0:
    print('Yes')
else:
    print('No')

a = input()
for i in range(len(a)):
    if (i + 1) % 2 == 1:
        if a[i] == "R" or a[i] == "U" or a[i] == "D":
            continue
        else:
            print("No")
            return
    else:
        if a[i] == "L" or a[i] == "U" or a[i] == "D":
            continue
        else:
            print("No")
            return
print("Yes")

s = input()
# sをリスト化
s = list(s)
# 1文字目から一つ置きに抜き出してリスト化
odd_list = s[0::2]
# 2文字目から一つ置きに抜き出してリスト化
even_list = s[1::2]

if "R" not in even_list and "L" not in odd_list:
    print("Yes")
else:
    print("No")

S = str(input())

answer = 'Yes'
for i in range(len(S)):
    j = i + 1
    if i % 2 == 0:
        if S[i] == 'L':
            answer = 'No'
    else:
        if S[i] == 'R':
            answer = 'No'


print(answer)


# 奇数 R U D
# 偶数 L U D

word = input()
odd_v = ['R', 'U', 'D']
odd_list = []
even_v = ['L', 'U', 'D']
even_list = []

for index, i in enumerate(word, 1):
    if index % 2 == 1:
        odd_list.append(i)
    else:
        even_list.append(i)

if set(odd_list).issubset(odd_v) and set(even_list).issubset(even_v):
    print('Yes')
else:
    print('No')

S=input()

def ans141(S:str):
    judge=0

    for i in range(0,len(S)):
        if (i+1)%2==1:
            if S[i]=="R" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
        else:
            if S[i]=="L" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
    if judge>0:
        return "No"
    else:
        return "Yes"

print(ans141(S))

s = [c for c in input()]
result = 'Yes'
for index, step in enumerate(s, start=1):
    if index % 2 == 1:
        if step not in "RUD":
            result = 'No'
            break
    else:
        if step not in "LUD":
            result = 'No'
            break

print(result)


list_s = list(input())
for i in range(0, len(list_s)):
    if list_s[i] == 'U' or list_s[i] == 'D': continue
    elif (i % 2 == 0 and list_s[i] == 'R') or (i % 2 != 0 and list_s[i] == 'L'): continue
    else: print("No")
    return
print("Yes")

S = input()
ok = True
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] == 'L':
            ok = False
            break
    else:
        if S[i] == 'R':
            ok = False
            break
if ok:
    print("Yes")
else:
    print("No")

S = input()

answer = 'Yes'
for i in range(len(S)):

    if i % 2 == 0:
        if 'L' in S[i]:
            answer = 'No'
    else:
        if 'R' in S[i]:
            answer = 'No'

print(answer)

s = input()

L = ['R', 'U', 'D']
M = ['L', 'U', 'D']

lens = len(s)
cnt = 0

for i in range(lens):
    if (i+1)%2 == 1 and s[i] in L:
        cnt += 1
    elif (i+1)%2 == 0 and s[i] in M:
        cnt += 1

if cnt == lens:
    print('Yes')
else :
    print('No')
        


S = input()
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']
for x in range(len(S)):
    if (x+1) % 2 == 0:
        if not S[x] in even:
            print('No')
            break
    else:
        if not S[x] in odd:
            print('No')
            break
else:
    print('Yes')

s=input()
ans="Yes"
for i in range(len(s)):
    if (i+1)%2==1:
        if s[i]=="L":
            ans="No"
    else:
        if s[i]=="R":
            ans="No"
print(ans)

S = input()
 
# Sの各文字は'L', 'R', 'U', 'D'のいずれかであることに注意する
# 1,3,...文字目が'L'でなく、偶数文字目が'R'でないとき 'Yes'とする
N = len(S)
ans = 'Yes'
for i in range(N):
  if (i % 2 == 0 and S[i] == 'L') or (i % 2 == 1 and S[i] == 'R'):
    ans = 'No'
    break
    
print(ans)

S = input()

s_odd = S[::2]
s_even = S[1::2]


def is_valid_str(s_list, valid_strs):
    for s in s_list:
        if s not in valid_strs:
            return False

    return True


even_ok = is_valid_str(s_even, ["L", "U", "D"])
odd_ok = is_valid_str(s_odd, ["R", "U", "D"])

if even_ok and odd_ok:
    print("Yes")
else:
    print("No")



s = input()
ans = 'Yes'
for i in range(len(s)):
    if (i+1) % 2 == 1:
        if s[i] not in ['R', 'U', 'D']:
            ans = 'No'
            break
    else:
        if s[i] not in ['L', 'U', 'D']:
            ans = 'No'
            break
print(ans)

S = str(input())

flag = True
for i in range(len(S)):
  if i%2==0 and S[i]=="L":
    flag = False
  elif i%2!=0 and S[i]=="R":
    flag = False
if flag:
  print("Yes")
else:
  print("No")

S = str(input())
ans = 0


for i in range(len(S)):
    if i%2 == 1:
        if S[i] == 'R':
            print('No')
            return
    else:
        if S[i] == 'L':
            print('No')
            return

print('Yes')

s = input()

if 'L' not in s[0::2] and 'R' not in s[1::2]:
    print('Yes')
else:
    print('No')

s = input()

ans = True

for c in s[0::2]:
    if c not in {'R', 'U', 'D'}:
        ans = False
        break

for c in s[1::2]:
    if c not in {'L', 'U', 'D'}:
        ans = False
        break

if ans:
    print('Yes')
else:
    print('No')


S = input()
point = 0
l = len(S)
i = 0
while i < l:
    if int(i % 2) == 1:
        if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
            point += 1
    else:
        if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
            point += 1
    i += 1

if point == l:
    print('Yes')
else:
    print('No')

S=input()
for i in range(len(S)):
    if i%2==0:
        if S[i] not in "RUD":
            print("No")
            break
    else:
        if S[i] not in "LUD":
            print("No")
            break
else:
    print("Yes")


s = input()
n = len(s)
ans = 'Yes'
for i in range(n):
    if i%2 == 0:
        if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
            ans = 'Yes'
        else:
            print('No')
            return

    else:
        if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
            ans = 'Yes'
        else:
            print('No')
            return

print(ans)

S = input()

mistakes = True
for i in range(len(S)):
    tmp = i%2
    if tmp == 0 and S[i] == "L":
        mistakes = False
    if tmp == 1 and S[i] == "R":
        mistakes = False

if mistakes:
    print("Yes")
else:
    print("No")

S = input()
even = S[1::2]
odd = S[::2]
if 'R' not in even and 'L' not in odd:
    print('Yes')
else:
    print('No')

#ABC141B
s = input()
print("Yes" if (s[::2].count("L")+s[1::2].count("R"))==0 else "No")

step = input()

# 条件：
# 奇数文字目がすべて R, U, D のいずれか。偶数文字目がすべて L, U, D のいずれか。
#S が「踏みやすい」文字列なら Yes を、そうでなければ No を出力してください。

s = list(step)

odd_list = s[0::2]
even_list = s[1::2]

if 'L' in odd_list or 'R' in even_list:
    print('No')
else:
    print('Yes')


s = input()
n = len(s)
res = "Yes"
for i in range(n):
  if i % 2 == 0:
    if s[i] == "L":
      res = "No"
  else:
    if s[i] == "R":
      res = "No"
print(res)

S = list(input())
def judge ():
    judge = True
    for i in range(1,1+len(S)):
        if i%2==0 and (S[i-1]=="L" or  S[i-1]=="U" or S[i-1]=="D"):
            continue
        elif i%2==1 and (S[i-1]=="R" or  S[i-1]=="U" or S[i-1]=="D"):
            continue
        else:
            judge = False
            break
    if (judge):
        return "Yes"
    else:
        return "No"

print((judge()))


s = input()
bool = True
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] != 'R' and s[i] != 'U' and s[i] != 'D':
            bool = False
    else:
        if s[i] != 'L' and s[i] != 'U' and s[i] != 'D':
            bool = False
if bool:
    print('Yes')
else:
    print('No')


s=str(input())

a=0
b=0

for i in range(len(s)):
    if i%2 == 0:
        if "L" in s[i]:
            a+=1

for i in range(len(s)):
    if i%2 != 0:
        if "R" in s[i]:
            b+=1


if a>0 or b>0:
    print("No")
else:
    print("Yes")



def abc(s):
    a = 0
    for i in range(0, len(s), 2):
        if s[i] == 'L':
            a += 1
    for j in range(1, len(s), 2):
        if s[j] == 'R':
            a += 1
    if a == 0:
        return 'Yes'
    else:
        return 'No'


print(abc(input()))

s=input()
count=0

for i in range(0,len(s)):
    if (i%2==0 and s[i]=="L") or (i%2==1 and s[i]=="R"):
        print("No")
        count=1
        break

if count==0:
    print("Yes")

S = input()
judge = True
for n in range(len(S)):
  if n % 2 == 0:
    if S[n] not in ["R","U","D"]:
      judge = False
      break
  else:
    if S[n] not in ["L","U","D"]:
      judge = False
      break
if judge:
  print("Yes")
else:
  print("No")

S = input()

answer = 'Yes'

for i in range(len(S)):

    j = i + 1
    # print(j)

    if j % 2 == 0:
        if 'R' in S[i]:
            answer = 'No'
    else:
        if 'L' in S[i]:
            answer = 'No'
    # print answer

print(answer)

N = str(input())
a = ['R','U','D']
b = ['L','U','D']
c = 0
for i in range(0, len(N)):
    if i % 2 == 0:
        if N[i] in a:
            c += 1

    else:
        if N[i] in b:
            c += 1


if c == len(N):
    print('Yes')
else:
    print('No')

S=input()
Count=0
for i in range(len(S)):
  if (i+1)%2==0 and (S[i]=="L" or S[i]=="U" or S[i]=="D"):
    Count+=1
  if (i+1)%2==1 and (S[i]=="R" or S[i]=="U" or S[i]=="D"):
    Count+=1
if Count==len(S):
  print("Yes")
else:
  print("No")

S=input()
for i in range(len(S)):
  if i % 2 == 0:
    if S[i] == "L":
      print("No")
      break
  else:
    if S[i] == "R":
      print("No")
      break
else:
  print("Yes")

S = input()
N = len(S)

# 1,3,...文字目が'R'でも'U'でも'D'でもない、または、2,4,...文字目が'L'でも'U'でも'D'でもないとき、'No'を出力する
ans = 'Yes'
for i in range(N):
  if (i % 2 == 0 and S[i] != 'R' and S[i] != 'U' and S[i] != 'D') or (i % 2 == 1 and S[i] != 'L' and S[i] != 'U' and S[i] != 'D'):
    ans = 'No'
    break
    
print(ans)

S = input()

Odd = ["R", "U", "D"]
Even = ["L", "U", "D"]
S_l = len(S)
result = "Yes"

for i in range(0, S_l):
    if i % 2 == 0:
        if not S[i] in Odd:
            result = "No"
            break
    if i % 2 != 0:
        if not S[i] in Even:
            result = "No"
            break

print(result)

S = input()
cnt = 0
for i in range(0, len(S)):
    if 'L' in S[0::2]:
        cnt += 1
    elif 'R' in S[1::2]:
        cnt += 1
if cnt == 0:
    print('Yes')
else:
    print('No')

S=input()
kisu=["R","U","D"]
gusu=["L","U","D"]


for i in range(len(S)):
	if (i+1)%2==0 and S[i] in gusu:
		continue
	elif (i+1)%2!=0 and S[i] in kisu:
		continue
	else:
		print("No")
		return

print("Yes")

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


import sys
import math
#from queue import *
#import random
#sys.setrecursionlimit(int(1e6))
input = sys.stdin.readline
 
############ ---- USER DEFINED INPUT FUNCTIONS ---- ############
def inp():
    return(int(input()))
def inara():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(list(map(int,input().split())))
################################################################
############ ---- THE ACTUAL CODE STARTS BELOW ---- ############

s=insr()

for i in range(0,len(s),2):
	if s[i]=='L':
		print("No")
		return

for i in range(1,len(s),2):
	if s[i]=='R':
		print("No")
		return

print("Yes")


S = input()

print("No" if "L" in  S[::2]  or "R" in S[1::2] else "Yes")

S = list(input())
ans = 'Yes'
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] == 'L':
            ans = 'No'
            break
    if i % 2 == 1:
        if S[i] == 'R':
            ans = 'No'
            break
print(ans)


s = input()
for i in range(len(s)):
  if i%2 == 0:
    if s[i] == "L":
      print("No")
      return
  elif s[i] == "R":
    print("No")
    return
print("Yes")

# Ｓを入力する
S = input()

# forループでタプルの要素を奇数番目と偶数番目で分ける
even = []
odd = []
for i in range(len(S)):
    if i % 2 == 0:
        even.append(S[i])
    else:
        odd.append(S[i])

# 奇数番目が全てR,U,Dか確認する
# 偶数番目がすべてL,U,Dか確認する
# ↑がTrueだったらYes,そうでないならNoを出力する

if "L" not in even and "R" not in odd:
    print("Yes")
else:
    print("No")

S = input()

print(("Yes", "No")["L" in S[::2] or "R" in S[1::2]])

s = input()
ans = "Yes"

for i in range(len(s)):
  if (i % 2 == 0 and s[i] == 'L') or (i % 2 == 1 and s[i] == 'R'):
    ans = "No"
print(ans)


# Sの各文字は L, R, U, D のいずれか
S = input()

odd_step = list(S[0::2])
even_step = list(S[1::2])

# UとDはodd,evenともに被っている
# oddとevenの判別はRとLだけ

# not in演算子で入っていないことを確認
if 'R' not in even_step and 'L' not in odd_step:
    print('Yes')
else:
    print('No')


S = input()
for i in range(1,len(S)+1):
    if(i % 2 == 1):
        if(S[i-1] == "R" or S[i-1] == "U" or S[i-1] == "D"):
            continue
        else:
            print("No")
            return
    else:
        if(S[i-1] == "L" or S[i-1] == "U" or S[i-1] == "D"):
            continue
        else:
            print("No")
            return
print("Yes")

S = list(input())
a = S[::2]
b = S[1::2]

if 'L' in a or 'R' in b:
    print('No')

else:
    print('Yes')


S = str(input())

ans = 'Yes'

for i in range(1,len(S)+1):
    not_char = ''
    #偶数の時
    if i % 2 == 0:
        not_char = 'R'
    else:
        not_char = 'L'
    if S[i-1:i] == not_char:
        ans = 'No'
        break
print(ans)


def __starting_point():

    S = list(input())
    
    chk = True
    for i in range(len(S)):
        if i % 2 == 1:
            if S[i] == "R":
                chk = False
                break
        else:
            if S[i] == "L":
                chk = False
                break
    if chk:
        print("Yes")
    else:
        print("No")

__starting_point()

S=input()
l=len(S)
yes=True
for i in range(l):
  if i%2:
    if S[i]=='R':
      yes=False
  else:
    if S[i]=='L':
      yes=False
if yes:
  print("Yes")
else:
  print("No")


s = list(input())
for i in s[::2]:
    if i == 'L':
        print('No')
        return
for j in s[1::2]:
    if j == 'R':
        print('No')
        return
print('Yes')

def answer(s: str) -> str:
    for i, c in enumerate(s):
        if i % 2 == 0:
            if c == 'L':
                return 'No'
        else:
            if c == 'R':
                return 'No'

    return 'Yes'


def main():
    s = input()
    print(answer(s))


def __starting_point():
    main()
__starting_point()

s=str(input())
d=True

for i in range(len(s)):
  if i%2==0:
    if s[i]!="R" and s[i]!="U" and s[i]!="D":
      d=False
  else:
    if s[i]!="L" and s[i]!="U" and s[i]!="D":
      d=False
if d:
  print("Yes")
else:
  print("No")

s = str(input())

if "L" in s[0::2] or "R" in s[1::2]:
    print("No")
else:
    print("Yes")

s = input()

odds = ['R', 'U', 'D']
evens = ['L', 'U', 'D']

for i in range(len(s)):
    if i%2 != 0:
        if s[i] not in evens:
            ans = 'No'
            break
    else:
        if s[i] not in odds:
            ans = 'No'
            break
else:
    ans = 'Yes'

print(ans)

S = input()
if 'L' in S[::2]:
    print('No')
elif 'R' in S[1::2]:
    print('No')
else:
    print('Yes')