Problem:
 Score: 200 points    Problem Statement  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 1 RUDLUDR      Sample Output 1 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.       Sample Input 2 DULL      Sample Output 2 No  The 3 -rd character is not R , U , nor D , so S is not easily playable.       Sample Input 3 UUUUUUUUUUUUUUU      Sample Output 3 Yes       Sample Input 4 ULURU      Sample Output 4 No       Sample Input 5 RDULULDURURLRDULRLR      Sample Output 5 Yes

Solution (Python):
import sys, bisect, math, itertools, string, queue, copy








def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

s = input()
k = ['R','U', 'D']
g = ['L', 'U', 'D']
isOK = True
i = 1
for t in s:
    if(i%2 == 0):
        isOK = t in g
    else:
        isOK = t in k
    if(isOK == False):
        break
    i += 1
print('Yes' if isOK else 'No')

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

Solution (Python):
s = str(input())
z = 'Yes'
for i in range(len(s)):
    if i%2 == 0:
        if s[i] != 'R' and s[i] != 'U' and s[i] != 'D':
            z = 'No'
            break
    else:
        if s[i] != 'L' and s[i] != 'U' and s[i] != 'D':
            z = 'No'
            break
print(z)

Solution (Python):
s = input()

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

Solution (Python):
S = input()
N=len(S)
x="Yes"
for i in range(0,N):
    if i%2==0 and S[i]=="L":
        x="No"
        break
    elif i%2==1 and S[i]=="R":
        x="No"
        break
print(x)

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

Solution (Python):
s=input()
i=0
flag=0
while i<len(s):
    if (i+1)%2==0:
        if s[i] =="L" or s[i] =="U" or s[i] =="D":
            pass
        else:
            flag+=1
         
    else:
        if s[i] =="R" or s[i] =="U" or s[i] =="D":
            pass
        else:
            flag+=1
     

    if flag==1:
        break


    i+=1

if flag==1:
    print("No")
else:
    print("Yes")

Solution (Python):
s=input()
i=0
flag=0
while i<len(s):
    if (i+1)%2==0:
        if s[i] =="L" or s[i] =="U" or s[i] =="D":
            pass
        else:
            flag+=1
         
    else:
        if s[i] =="R" or s[i] =="U" or s[i] =="D":
            pass
        else:
            flag+=1
     

    if flag==1:
        break


    i+=1

if flag==1:
    print("No")
else:
    print("Yes")

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

S = list(input())
odd = set(['R', 'U', 'D'])
even = set(['L', 'U', 'D'])

leng = len(S)
for i in range(leng):
    if i%2==1:
        if not S[i] in even:
            print('No')
            break
    else:
        if not S[i] in odd:
            print('No')
            break
else:
    print('Yes')

Solution (Python):
S = input()

for i in range(1, len(S)+1):
    if i % 2 == 0 and S[i-1] == 'R':
        print('No')
        break
    elif i % 2 != 0 and S[i-1] == 'L':
        print('No')
        break
else:
    print('Yes')

Solution (Python):
s = input()
l = len(s)
o = ["R", "U", "D"]
e = ["L", "U", "D"]
x = 1
for i in range(l):
    if i == (2 * int(i / 2)):
        if s[i] not in o:
            x = 0
    else:
        if s[i] not in e:
            x = 0
print("Yes" if x == 1 else "No")

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

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

Solution (Python):

s = input()
i = 0
check = True
while(i < len(s)):
    if(i % 2 == 0 and s[i] == "L"):
        check = False
        break
    elif(i % 2 == 1 and s[i] == "R"):
        check = False
        break
    i += 1

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

Solution (Python):
S = list(input())

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

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

Solution (Python):
S = input()

if S[0::2].count('L') == 0 and S[1::2].count('R') == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
S=list(str(input()))
a=[]
for i in range(len(S)):
    if (i+1)%2==0 and (S[i]=='L' or S[i]=='U' or S[i]=='D'):
        a.append('Yes')
    elif (i+1)%2==1 and (S[i]=='R' or S[i]=='U' or S[i]=='D'):
        a.append('Yes')
    else:
        a.append('No')
if 'No' in a:
    print('No')
else:
    print('Yes')

Solution (Python):
s = input()
flg = 0
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] not in ["R", "U", "D"]:
            flg = 1
    else:
        if s[i] not in ["L", "U", "D"]:
            flg = 1
print("Yes" if flg == 0 else "No")

Solution (Python):
S=input()
so=[]
se=[]
for i in range(len(S)):
  if i%2==1:
    se.append(S[i])
  else:
    so.append(S[i])
if (se.count("R")+so.count("L"))==0:
  print("Yes")
else:
  print("No")

Solution (Python):
S = input()

for s in S[0::2]:
  if s not in "RUD":
    print("No")
    exit()

for t in S[1::2]:
  if t not in "LUD":
    print("No")
    exit()
    
print("Yes")

Solution (Python):
S = str(input())
check = 1
for i in range(len(S)):
    if i%2==0 and S[i]=='L':
        check = 0
        break
    elif i%2==1 and S[i]=='R':
        check = 0
        break
if check == 1:
    print('Yes')
else:
    print('No')

Solution (Python):


import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

S = input()

odd = ('R', 'U', 'D')
even = ('L', 'U', 'D')

for i, s in enumerate(S):
    if not i % 2 and s not in odd:
        print('No')
        sys.exit()
    if i % 2 and s not in even:
        print('No')
        sys.exit()

print('Yes')

Solution (Python):
s = input()
tapflag = True

for p in range(len(s)):
  if p % 2 == 0:
    if s[p] != 'R' and s[p] != 'U' and s[p] != 'D':
      tapflag = False
  if p % 2 == 1:
    if s[p] != 'L' and s[p] != 'U' and s[p] != 'D':
      tapflag = False
      
if tapflag:
  print('Yes')
else:
  print('No')

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

Solution (Python):
s = input()
ans = 'Yes'
for index, value in enumerate(s):
    if (index + 1)%2 == 0 and value not in ['L', 'U', 'D']:
        ans = 'No'
    elif (index + 1)%2 != 0 and value not in ['R', 'U', 'D']:
        ans = 'No'
        
print(ans)

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

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

Solution (Python):
s = str(input())
isError = False
for i in range(len(s)):
    if i%2==0:
        if s[i]=='L':
            isError = True
    else:
        if s[i]=='R':
            isError = True
if isError:
    print('No')
else:
    print('Yes')

Solution (Python):
s=input()
o=["R","U","D"]
e=["L","U","D"]
for i in range(len(s)):
  if i%2==0:
    if s[i] in o:
      pass
    else:
      print("No")
      break
  else:
    if s[i] in e:
      pass
    else:
      print("No")
      break
else:
  print("Yes")

Solution (Python):
S = input()
LS = len(S)

for i in range(LS):
  if i%2 == 1:
    if S[i] == "R":
      print("No")
      exit()
  else:
    if S[i] == "L":
      print("No")
      exit()
      
print("Yes")

Solution (Python):
S = input()
ng = False
for i, c in enumerate(S):
    if ((i + 1) % 2 == 0 and c == 'R') or ((i + 1) % 2 == 1 and c == 'L'):
        ng = True
        break
if ng:
    print('No')
else:
    print('Yes')

Solution (Python):
s = list(input())

flag = True

for i in range(len(s)):
    if i % 2 == 0:
        if s[i] == "L":
            flag = False
            break
    else:
        if s[i] == "R":
            flag = False
            break

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

Solution (Python):
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math

s=input()
bool=True
for i in range(len(s)):
    if i%2==0:
        if s[i]=="R" or s[i]=="U" or s[i]=="D":
            continue
        else:
            bool=False
            break
    else:
        if s[i]=="L" or s[i]=="U" or s[i]=="D":
            continue
        else:
            bool=False
            break

if bool is True:
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()
print('Yes' if ('R' not in s[1::2]) and ('L' not in s[::2]) else 'No')

Solution (Python):
S= str(input())
S=list(S)
for i in range(len(S)):
    if i%2==0:
        if S[i] not in ('R','U','D'):
            print('No')
            exit()
    if i%2!=0:
        if S[i] not in ('L','U','D'):
            print('No')
            exit()
print('Yes')

Solution (Python):
s=input() 
ans=0
for i in range(0,len(s),2):
  if s[i]!='R' and s[i]!='U'  and s[i]!='D':
    ans=1
for j in range(1,len(s),2):
  if s[j]!='U' and s[j]!='L' and s[j]!='D':
    ans=1
if ans==0:
  print('Yes')
else:
  print('No')

Solution (Python):
l = list(input())
f = False

for i in range(len(l)):
    if i % 2:
        if l[i] == 'L' or l[i] == 'U' or l[i] == 'D':
            f = True
        else:
            f = False
            break
    else:
        if l[i] == 'R' or l[i] == 'U' or l[i] == 'D':
            f = True
        else:
            f = False
            break

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

Solution (Python):
S = input()

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

Solution (Python):
s = input()
playable = True
for i, c in enumerate(s):
    if i % 2 == 1 and c == 'R' or i % 2 == 0 and c == 'L':
        playable = False
        break
print("Yes" if playable else "No")

Solution (Python):


s = list(input())

for i, posi in enumerate(s):
    num = i+1
    if num % 2 == 0 and posi == 'R':
        print('No')
        exit(0)
    elif num % 2 != 0 and posi == 'L':
        print('No')
        exit(0)

print('Yes')

Solution (Python):
s = list(input())
for i in range(len(s)):
    if i % 2 == 0 and s[i] == "L":
        print("No")
        exit()
    if i % 2 != 0 and s[i] == "R":
        print("No")
        exit()
print("Yes")

Solution (Python):
S = input()
odd_ls = ['R', 'U', 'D']
even_ls = ['L', 'U', 'D']
result = True
for i in range(len(S)):
    if i % 2 == 0 and S[i] not in odd_ls:
        result = False
    elif i % 2 == 1 and S[i] not in even_ls:
        result = False
if result:
    print('Yes')
else:
    print('No')

Solution (Python):
str = input()
ans = "Yes"
for i in range(len(str)):
  if (i + 1) % 2 == 0 and str[i] not in ('L', 'U', 'D'):
    ans = "No"
  if (i + 1) % 2 == 1 and str[i] not in ('R', 'U', 'D'):
    ans = "No"
 
print(ans)

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

Solution (Python):
S = input()
ki = 'RUD'
gu = 'LUD'
for i, s in enumerate(S):
    if i%2 == 0:
        if s not in ki:
            print('No')
            exit()
    else:
        if s not in gu:
            print('No')
            exit()
print('Yes')

Solution (Python):
odd='RUD'
even='LUD'
s=input()
flag=0
for i in range(len(s)):
  a=i+1
  if a%2==0:
    if s[i] not in even:
      flag=1
      break
  else:
    if s[i] not in odd:
      flag=1
      break
if flag==1:
  print ('No')
else:
  print ('Yes')

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

Solution (Python):
s = input()
if 'L' not in s[::2] and 'R' not in s[1::2]:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
count = 0
for i in range(len(S)):
  if i%2 == 0:
    if 'RUD'.count(S[i]) != 1:
      count +=1
  else:
    if 'LUD'.count(S[i]) != 1:
      count +=1
if count == 0:
  print('Yes')
else:
  print('No')

Solution (Python):
S = input()
ok = True
for i, s in enumerate(S):
  if not i % 2 and s == 'L':
    ok = False
    break
  if i % 2 and s == 'R':
    ok = False
    break
if ok:
  print('Yes')
else:
  print('No')

Solution (Python):
s = input()
n = len(s)

for i in range(0, n, 2):
    if s[i] == 'L':
        print('No')
        exit()

for i in range(1, n, 2):
    if s[i] == 'R':
        print('No')
        exit()

print('Yes')

Solution (Python):
s=str(input())

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

print("Yes")

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

Solution (Python):
s=input()
for i in range(len(s)):
  if i%2==0 and s[i]=='L':
    print('No')
    exit()
  elif i%2==1 and s[i]=='R':
    print('No')
    exit()
print('Yes')

Solution (Python):
s = input()
n = len(s)
flg = True
for i in range(n):
  if i % 2 == 0 and s[i] == 'L':
    flg = False
    break
  elif i % 2 == 1 and s[i] == 'R':
    flg = False
    break

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

Solution (Python):
S = input()
if len(set(S[::2]) - {"R","U","D"}) == 0 and len(set(S[1::2]) - {"L","U","D"}) == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
cnt = 0
for s in S[::2]:
    if s in {"R", "U", "D"}:
        cnt += 1
for s in S[1::2]:
    if s in {"L", "U", "D"}:
        cnt += 1
if cnt == len(S):
    print("Yes")
    exit()
print("No")

Solution (Python):
s=input()
t=0
if any([i=="R" for i in s[1::2]]) or any([i=="L" for i in s[::2]]):
    t=1
print("YNeos"[t::2])

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

Solution (Python):






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

Solution (Python):
S = list(input())
S_odd = [s for i, s in enumerate(S) if i % 2 == 0]
S_even = [s for i, s in enumerate(S) if i % 2 != 0]
if 'L' in S_odd or 'R' in S_even:
    print('No')
else:
    print('Yes')

Solution (Python):
s = input()
import sys
n = len(s)
kisuu = ["R","U","D"]
guusuu = ["L","U","D"]

for i in range(n):
    if i%2 == 0:
        if s[i] not in kisuu:
            break
    else:
        if s[i] not in guusuu:
            break
else:
    print("Yes")
    sys.exit()
print("No")

Solution (Python):
s=input()
count=1
ans='Yes'
for i in s:
    if count%2==1:
        if i=='R' or i=='U' or i=='D':
            count+=1
            continue
        else:
            ans='No'
            break
    else:
        if i=='L' or i=='U' or i=='D':
            count+=1
            continue
        else:
            ans='No'
            break
print(ans)

Solution (Python):
import sys
s = input()

l1 = ['L', 'U', 'D']
l2 = ['R', 'U', 'D']

cnt = 0
for i in range(len(s)):
  if i == 0 or i%2 == 0:
    if s[i] not in l2:
      print('No')
      sys.exit()
  else:
    if s[i] not in l1:
      print('No')
      sys.exit()

print('Yes')

Solution (Python):
def main():
  s=input()
  flg=0
  for i in range(0,len(s)):
    if i%2==1:
      if s[i]=='R':
        flg=1
        break
    else:
      if s[i]=='L':
        flg=1
        break
  if(flg==1):
    print('No')
  else:
    print('Yes')
    
main()

Solution (Python):
S = input()
point = 0

if len(S)%2 == 0:
    for i in range(0,len(S),2):
        if S[i] in 'RUD' and S[i+1] in 'LUD':
            point += 2

if len(S)%2 == 1:
    if S[0] in 'RUD':
        point += 1
    for i in range(1,len(S),2):
        if S[i+1] in 'RUD' and S[i] in 'LUD':
            point += 2

if point == len(S):
    print('Yes')
else:
    print('No')

Solution (Python):
from sys import stdin

s = list(stdin.readline().rstrip())

ans = True

odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']

for i, t in enumerate(s):
    if (i+1)%2 == 1:
        if not t in odd:
            ans = False
    else:
        if not t in even:
            ans = False

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

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

Solution (Python):
s=input()

for i in range(len(s)):
    if (i%2==0) & (s[i]=="L"):
        print("No")
        exit()
    if (i%2!=0) & (s[i]=="R"):
        print("No")
        exit()
print("Yes")

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

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

Solution (Python):
s = input()

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

Solution (Python):
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")
            break
    else:
        if s[i - 1] == "L" or s[i - 1] == "U" or s[i - 1] == "D":
            continue
        else:
            print("No")
            break
else:
    print("Yes")

Solution (Python):
word = str(input())
even = word[1::2]
odd = word[::2]
if ("R" in even) or ("L" in odd):
    print("No")
else:
    print("Yes")

Solution (Python):
s=input()

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

Solution (Python):
S=input()
count=0
Ans=True
for i in range(len(S)):
    if i%2==1 and S[i]=="R":
        Ans=False
    elif i%2==0 and S[i]=="L": 
        Ans=False
if Ans==True:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()

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

Solution (Python):
s = input()
n = len(s)
yes = True
for i in range(n):
    if i % 2 == 0:
        if s[i] == "L":
            yes = False
    elif s[i] == "R":
        yes = False
if yes:
    print("Yes")
else:
    print("No")

Solution (Python):
































































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    S = lines[0]
    
    
    
    
    
    
    
    
    
    

    rstr = ''
    lstr = ''

    for i, char in enumerate(S):
        if i % 2 == 0:
            rstr += char
        else:
            lstr += char
    
    if 'L' in rstr:
        result = 'No'
    elif 'R' in lstr:
        result = 'No'
    else:
        result = 'Yes'

    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['RUDLUDR']
        lines_export = ['Yes']
    if pattern == 2:
        lines_input = ['DULL']
        lines_export = ['No']
    if pattern == 3:
        lines_input = ['UUUUUUUUUUUUUUU']
        lines_export = ['Yes']
    if pattern == 4:
        lines_input = ['ULURU']
        lines_export = ['No']
    if pattern == 5:
        lines_input = ['RDULULDURURLRDULRLR']
        lines_export = ['Yes']
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

Solution (Python):
s = list(input())
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']
ret = 'Yes'
for i, j in enumerate(s):
    if (i+1)%2 == 1 and j not in odd:
        ret = 'No'
        break
    elif (i+1)%2 == 0 and j not in even:
        ret = 'No'
        break
print(ret)

Solution (Python):
s=input();print('No'if'L'in s[::2] or'R'in s[1::2] else'Yes')

Solution (Python):
s=input();print('No'if [1 for i in s[::2] if i=='L'] or [1 for i in s[1::2] if i=='R'] else'Yes')

Solution (Python):
import sys
s=input()
for i in range(len(s)):
    if i%2==0 and "L" in s[i]:
        print("No")
        sys.exit()
    elif i%2==1 and "R" in s[i]:
        print("No")
        sys.exit()
print("Yes")

Solution (Python):
S = input()

check = True
for i, s in enumerate(S):
  if (i+1)%2 == 0:
    if not(s == "L" or s == "U" or s == "D"):
      check = False
  else:
    if not(s == "R" or s == "U" or s == "D"):
      check = False

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

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

Solution (Python):
s = input()
n = len(s)
ans = 0

for i in range(n):
    if i % 2 == 0:
        if s[i] != 'L':
            ans += 1
    else:
        if s[i] != 'R':
            ans += 1
            
if ans == n:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
print('No' if 'L' in s[::2] or 'R' in s[1::2] else 'Yes')

Solution (Python):
s = input()
print('Yes' if set(s[::2]) <= {'R', 'U', 'D'} and set(s[1::2]) <= {'L', 'U', 'D'} else 'No')

Solution (Python):
S = input()

gu = ['R', 'U', 'D']
ki = ['L', 'U', 'D']
flag = True
for i, s in enumerate(S):
    if i%2==0:
        if s in gu:
            pass
        else:
            flag = False
            break
    else:
        if s in ki:
            pass
        else:
            flag = False
            break

if flag:
    print('Yes')
else:
    print("No")

Solution (Python):
S = input()
flag = True
for i in range(len(S)):
  if (i+1) % 2 == 1:
    if S[i] =="R" or S[i] =="U" or S[i] =="D":
      pass
    else:
      flag = False
      break
  else:
    if S[i] =="L" or S[i] =="U" or S[i] =="D":
      pass
    else:
      flag = False
      break
if flag:
  print("Yes")
else:
  print("No")

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

Solution (Python):
odd=["R","U","D"]
even=["L","U","D"]
S=input()
i=0
for x in range(len(S)):
  if x%2==0 and S[x] in odd:
    i+=1
  elif x%2==1 and S[x] in even:
    i+=1
if i==len(S):
  print("Yes")
else:
  print("No")

Solution (Python):
S=input()
count=0
s=list(S)
for i in range(len(S)):
    if (i+1)%2!=0:
        if s[i]=='R' or s[i]=='U' or s[i]=='D':
            count+=1
    else:
        if s[i]=='L' or s[i]=='U' or s[i]=='D':
            count+=1
if count==len(S):
    print('Yes')
else:
    print('No')

Solution (Python):
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)

Solution (Python):
s = list(input())

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

Solution (Python):
s = input()
print(["Yes", "No"]["L" in s[::2] or "R" in s[1::2]])

Solution (Python):
S = input()
for i, s in enumerate(list(S), 1):
    if (i % 2 == 0 and s == 'R') or (i % 2 == 1 and s == 'L'):
        print('No')
        break
else:
    print('Yes')

Solution (Python):
s = input().rstrip()
for i,l in enumerate(s):
    if i&1:
        if 'R' in l:
            print('No')
            break
    else:
        if 'L' in l:
            print('No')
            break
else:
    print('Yes')

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

s = s()

for i in range(len(s)):
    if (i+1) % 2 !=0:
        if s[i] == "R" or s[i]=="U" or s[i]=="D":
            pass
        else:
            print("No")
            sys.exit()
    else:
        if s[i]=="L" or s[i]=="U" or s[i]=="D":
            pass
        else:
            print("No")
            sys.exit()

print("Yes")

Solution (Python):
s = input()
l1 = ['D','R','U']
l2 = ["D",'L','U']
count = 0

for i in s[::2]:
    if i in l1 :
        count += 1
for i in s[1::2]:
    if i in l2:
        count += 1
    
if count == len(s):
    print('Yes')
else:
    print('No')

Solution (Python):
def main():
    S = str(input())
    odd = (len(S) // 2) + (len(S) % 2)
    even = len(S) // 2
    check_odd = 0
    check_even = 0
    c = 0
    for i in range(odd):
        if S[c] == 'R' or S[c] == 'U' or S[c] == 'D':
            check_odd = check_odd + 1
        c = c + 2
    c = 1
    for i in range(even):
        if S[c] == 'L' or S[c] == 'U' or S[c] == 'D':
            check_even = check_even + 1
        c = c + 2
    if check_even == even and check_odd == odd:
        print('Yes')
    else:
        print('No')
main()

Solution (Python):
s=input()
ok=True

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

Solution (Python):
import sys
S = list(input())
S_odd = S[::2]
S_even = S[1::2]
easy_odd = ['R','U','D']
easy_even = ['L','U','D']

print('Yes') if set(S_odd).issubset(easy_odd) and set(S_even).issubset(easy_even) else print('No')

Solution (Python):
s = input()
flag = True
for i in range(len(s)):
  if i%2==0:
    if s[i] not in ['R', 'U', 'D']:
      flag = False
      break
  else:
    if s[i] not in ['L', 'U', 'D']:
      flag = False
      break
if flag:
  print("Yes")
else:
  print("No")

Solution (Python):
import sys
S = input()
for i in range(0, len(S), +2):
    if S[i] == "L":
        print("No")
        sys.exit()    
if len(S) == 1:
    print("Yes")
    sys.exit()
for i in range(1, len(S), +2):
    if S[i] == "R":
        print("No")
        sys.exit()
print("Yes")

Solution (Python):
N=str(input())
if 'L' in N[0::2] or 'R' in N[1::2]:
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()
odd_S = S[0::2]
even_S = S[1::2]
if 'L' in odd_S or 'R' in even_S:
    print('No')
else:
    print('Yes')

Solution (Python):
s = input()
odd = ["R","U","D"]
even = ["L","U","D"]
cnt = 0
for i in s[::2]:
    if i in odd:
        cnt += 1
for j in s[1::2]:
    if j in even:
        cnt += 1
        
print("Yes") if cnt == len(s) else print("No")

Solution (Python):
li=list(input())
ll=[]
rr=[]
fl=True
for i in li:
  if fl:
    fl=False
    rr.append(i)
    continue
  fl=True
  ll.append(i)
if "L" in rr or "R" in ll:
  print("No")
else:
  print("Yes")

Solution (Python):
S=input()
print("YNeos"["L" in S[0::2] or "R" in S[1::2]::2])

Solution (Python):
import re
S=input()
print("NYoe s"[len(re.sub("[RUD]",'',S[0::2]))==0==len(re.sub("[LUD]",'',S[1::2]))::2])

Solution (Python):
s = input()

od = s[0 :: 2]
ev = s[1 :: 2]

if all(x != 'L' for x in od) and all(y != 'R' for y in ev):
  print('Yes')

else:
  print('No')

Solution (Python):
s = input()
x = 0


for i in range(1,len(s),2):
    if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
        x += 1

for i in range(0,len(s),2):
    if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
        x += 1


if x == len(s):
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
S = input()

for i in range(len(S)):
    if (i%2==0 and S[i] in ["R", "U", "D"]) or (i%2!=0 and S[i] in ["L", "U", "D"]):
        continue
    else:
        print("No")
        sys.exit()
print("Yes")

Solution (Python):
S = input()
odd_S = S[0::2]
even_S = S[1::2]
if 'L' in odd_S or 'R' in even_S:
    print('No')
else:
    print('Yes')

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

Solution (Python):
S = input()
print("Yes" if all(s in ["R","U","D"] for s in S[::2]) \
      and all(s in ["L","U","D"] for s in S[1::2]) else "No")