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):
S = input()
count = 0
for letter in S:
    count += 1
    if count % 2 == 1 and letter == "L":
        print("No")
        count -=1
        break
    elif count % 2 == 0 and letter == "R":
        print("No")
        count -=1
        break
if count == len(S):
    print("Yes")

Solution (Python):
def main():
    s = list(input())
    
    odd_s = s[0::2]
    even_s = s[1::2]
    
    if "L" not in odd_s and "R" not in even_s:
        print("Yes")
    else:
        print("No")
    

if __name__ == "__main__":
    main()

Solution (Python):
S = input()
flag = 0
for index, word in enumerate(S):
    if (word == 'U' or word == 'D') or (index%2 == 1 and word == 'L') or (index%2 == 0 and word == 'R'):
        pass
    else:
        flag = 1
        break;
print('Yes' if flag ==0 else 'No')

Solution (Python):
l = list(input())
ans = 0
for i in range(len(l)):
  if i == i//2*2:
    if l[i] == "L":
      print("No")
      ans += 1
      break
    else:
      continue
  else:
    if l[i] == "R":
      print("No")
      ans += 1
      break
    else:
      continue
if ans == 0:
  print("Yes")

Solution (Python):
s=input()
a = "No"

if {"R","U","D"} >= set(list(s[0::2])):
  if {"L","U","D"} >= set(list(s[1::2])):
  	a = "Yes"

print(a)

Solution (Python):
s=input()

if {"R","U","D"} >= set(list(s[0::2])) and {"L","U","D"} >= set(list(s[1::2])):
  print("Yes")
else:
  print("No")

Solution (Python):
s=input()

k_s = set(list(s[0::2]))
g_s = set(list(s[1::2]))

if {"R","U","D"} >= k_s and {"L","U","D"} >= g_s:
  print("Yes")
else:
  print("No")

Solution (Python):
S = input()

flag = 1
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] != "R" and S[i] != "U" and S[i] != "D":
            flag = 0
    else:
        if S[i] != "L" and S[i] != "U" and S[i] != "D":
            flag = 0
    if flag == 0:
        break
if flag == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()


def oj():
  o = "y"
  
  for i in S[0::2]:
    if i == "L":
      o = "n"
  return o
  

def ej():
  e = "y"
  
  for i in S[1::2]:
    if i == "R":
      e = "n"
  return e
  

def j(o,e):
  if o == "y" and e == "y":
    print("Yes")
  else:
    print("No")

j(oj(),ej())

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

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

Solution (Python):
s=input();print("YNeos"[(("L" in set(s[::2]))or("R" in set(s[1::2])))::2])

Solution (Python):
S = str(input())
odd = []
even = []
A = False
B = False

for i in range(len(S)):
    if i % 2 == 0:
        odd.append(S[i])
    else:
        even.append(S[i])

for i in range(len(odd)):
    if odd[i] == 'R' or odd[i] == 'U' or odd[i] == 'D':
        A = True
    else:
        A = False
        break

for i in range(len(even)):
    if even[i] == 'L' or even[i] == 'U' or even[i] == 'D':
        B = True
    else:
        B = False
        break

if len(S) == 1:
    if A == True:
        print('Yes')
    else:
        print('No')
else:
    if A == True and B == True:
        print('Yes')
    else:
        print('No')

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

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

Solution (Python):
S = input()
 
S_contains = list(v for v in S)
 
even_list = S_contains[1::2]
odd_list = S_contains[0::2]
 
if 'R' in even_list or 'L' in odd_list:
    print('No')
else:
    print('Yes')

Solution (Python):
import sys
input = sys.stdin.readline
S = input()
odd_list = []
even_list = []
for i in range(len(S)-1):
    if i%2!=0:
        even_list.append(S[i])
    else:
        odd_list.append(S[i])


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

Solution (Python):
ss = raw_input()
odd = ["R", "U", "D"]
even = ["L", "U", "D"]
odds = []
evens = []

for i, s in enumerate(ss, 1):
    if i % 2 == 0:
        if s in even:
            evens.append(True)
        else:
            evens.append(False)
    else:
        if s in odd:
            odds.append(True)
        else:
            odds.append(False)
print 'Yes' if all(odds) and all(evens) else 'No'

Solution (Python):
S=input()
for n in range(len(S)):
    if n % 2 != 0:
        if S[n]=='R':
            print('No')
            exit(0)
    elif n % 2 == 0:
        if S[n] == 'L':
            print('No')
            exit(0)
print('Yes')

Solution (Python):
S=input()
for n in range(len(S)):
    if n % 2 != 0:
        if S[n]=='R':
            print('No')
            exit(0)
    elif n % 2 == 0:
        if S[n] == 'L':
            print('No')
            exit(0)
print('Yes')

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):
S = input()

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

Solution (Python):
s=input()
ans = "Yes"
for i,v in enumerate(s):
    if i%2==0:
        if v=="L":
            ans = "No"
    else:
        if v=="R":
            ans = "No"
print(ans)

Solution (Python):
ws = input()
list_e=[]
list_o=[]

for n, v in enumerate(ws):
  if n % 2 == 0:
    list_e.append(v)
  else:
    list_o.append(v)

if "L" not in list_e and "R" not in list_o:
  print("Yes")
else:
  print("No")

Solution (Python):
import sys

s=input()

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

Solution (Python):
import sys

s = input()

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

Solution (Python):
import sys

s = input()

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

Solution (Python):
s = input()
a = s[::2]
b = s[1::2]

if a.find("L") != -1 or b.find("R") != -1:
  print("No")
else:
  print("Yes")

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

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

Solution (Python):
s = input()
a = 'Yes'

for i in range(len(s)):
    if s[i] == 'U' or s[i] == 'D':
        continue
    
    if i % 2 == 0:
        if s[i] == 'R':
            continue
        else:
            a = 'No'
            break
    else:
        if s[i] == 'L':
            continue
        else:
            a = 'No'
            break

print(a)

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

Solution (Python):

S = input()
j = 1
flag = False
for i in S:
    if j % 2 != 0 :
        if(i == 'L'):
            flag = True
            break
    else:
        if(i == 'R'):
            flag = True
            break
    j= j+1

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

Solution (Python):
s = list(input())
odd_s = "".join(s[::2])
even_s = "".join(s[1::2])

odd_c = ["R","U","D"]
even_c = ["L","U","D"]

flag = True

for w in odd_s:
    if w not  in odd_c:
        flag = False
        
for w in even_s:
    if w not  in even_c:
        flag = False
        
if flag :
    print("Yes")
else:
    print("No")

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

Sodd = S[::2]
Seven = S[1::2]

if "L" in Sodd:
  print("No")
elif "R" in Seven:
  print("No")
else:
  print("Yes")

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

a = ['R', 'U', 'D']
b = ['L', 'U', 'D']

def solve(s):
    for i in range(len(s)):
        if i % 2 == 0:
            if (s[i] not in a):
                return False
        else:
            if (s[i] not in b):
                return False
    return True

if (solve(s)):
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
S = input()
str_list = list(S)
odd_str = str_list[0::2]
even_str = str_list[1::2]
if ('R' in even_str):
  print('No')
elif ('L' in odd_str):
  print('No')
else:
  print('Yes')

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

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

flag=0

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

Solution (Python):
S=input()
flg=0
for i in range(len(S)):
    if i%2==0:
        if S[i]=="L":
            flg=1
            break
    else:
        if S[i]=="R":
            flg=1
            break

if flg==0:
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()

slist=list(s)
i=0
l=0

for sin in slist:
    if i%2==0:
        if sin=='L':
            print('No')
            l=1
            break
    else:
        if sin=='R':
            print('No')
            l=1
            break
    i+=1    

if l==0:
    print('Yes')

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

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

flag=True
for i in range(len(s)):
    if (i+1)%2==0:
        if s[i] not in {'L', 'U', 'D'}:
                flag=False
                
                break;
    else:
        if s[i] not in {'R', 'U', 'D'}:
                flag=False
               
                break;
if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
cnt = 0
out = 0

for i in S:
  cnt += 1
  if out == 1:
    break
  if cnt % 2 == 0:
    if i == 'R':
      out = 1
  else:
    if i == 'L':
      out = 1

if out == 1:
  print('No')
else:
  print('Yes')

Solution (Python):
import sys
S = raw_input()
d = ["L","R","U","D"]
k = ["R","U","D"]
g = ["L","U","D"]
def r():
    print("No")
    sys.exit()
x = 1
if not (1 <= len(S) and len(S) <= 100): r()
for c in S:
    if not c in d:
        r()
    if(x % 2 == 0):
        if not c in g:
            r()
    else:
        if not c in k:
            r()
    x += 1

print("Yes")

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

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

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

Solution (Python):
tap = input()
int_len=len(tap)
bad_count=0

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

Solution (Python):
S = input()

ki = set(S[0::2])
gu = set(S[1::2])


if 'L' in ki or 'R' in gu:
    print('No')
else:
    print('Yes')

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

ans = 0

for i,j in enumerate(s):
  if (i%2==0 and j=="L") or (i%2==1 and j=="R"):
    ans = 1

print(["Yes","No"][ans])

Solution (Python):
import sys

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

Solution (Python):
S = input()

total = 0

for i in range(len(S)):
    if (i % 2) == 0:
        if (S[i] == 'R') or (S[i] == 'U') or (S[i] == 'D'):
            pass
        else:
            total += 1
    else:
        if (S[i] == 'L') or (S[i] == 'U') or (S[i] == 'D'):
            pass
        else:
            total += 1

if total == 0:
    print('Yes')
else:
    print('No')

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

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

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

Solution (Python):
tap = input()

tap_list = list(tap)
result_list = []

for val in range(len(tap)):
	if ('R' in tap_list[val]) and (val%2 == 1) :
		result_list.insert(0,1)
	elif ('L' in tap_list[val])and (val%2 == 0) :
		result_list.insert(0,1)
	else:
		result_list.insert(0,0)

if 1 in result_list :
	print('No')	
else :
		print('Yes')

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

odd_list = ['R', 'U', 'D']
even_list = ['L', 'U', 'D']
indic_list = []
newS = []

for j in S:
    newS.append(j)

for index, i in enumerate(newS):
    if (index+1) % 2 == 0:
        if i in even_list:
            indic_list.append(True)
        else:
            indic_list.append(False)
    else:
        if i in odd_list:
            indic_list.append(True)
        else:
            indic_list.append(False)

if all(indic_list):
    print('Yes')
else:
    print('No')

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

flag = 0

for i in range(len(s)):
    if (i+1)%2==0:
        if s[i] == 'R':
            flag = 1
    else:
        if s[i] == 'L':
            flag = 1


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

Solution (Python):
step = input()
ans = 'Yes'

for i,com in enumerate(step):
  if (com == 'R' and (i+1)%2 == 0) or (com == 'L' and (i+1)%2 == 1):
    ans = 'No'

print(ans)

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

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

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

Solution (Python):
w= input()
a=w[::2]
b=w[1::2]

c="L" in a
d="R" in b

if c ==True:
    print("No")
elif d == True:
    print("No")
else:
    print("Yes")

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

Solution (Python):
S=input()
flag=True
i=1
for c in S:

    if (i%2==1 and c=='L') or (i%2==0 and c=='R'):
        flag=False
        break;
    i+=1
print('Yes' if flag else 'No')

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

Solution (Python):
S = input()

easy_step = True
for i in range(len(S)):
    if (i+1) % 2 == 0:
        easy_step &= S[i] in ['L', "U", "D"]
    else:
        easy_step &= S[i] in ["R", "U", "D"]
if easy_step:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()




def check_step(S):
   for i in range(len(S)):
      if (i+1)%2==1:
         if S[i]=="L" :
            print("No")
            return 
      else:
         if S[i]=="R" :
            print("No")
            return 
   print("Yes")
check_step(S)

Solution (Python):
import sys
import math
import numpy as np
import copy

def main():
    s = input()
    ret = True
    for i in range(len(s)):
        c = s[i]
        if i % 2 == 0 and c == 'L':
            ret = False
        if i % 2 == 1 and c == 'R':
            ret = False

    print("Yes" if ret else "No")
    return 0

if __name__ == '__main__':
    sys.exit(main())

Solution (Python):
import sys
S = list(input())
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] == "R" or S[i] == "U" or S[i] == "D":
            continue
        else:
            print("No")
            sys.exit()
    else:
        if S[i] == "L" or S[i] == "U" or S[i] == "D":
            continue
        else:
            print("No")
            sys.exit()
else:
    print("Yes")

Solution (Python):
s = input()
odd = ["R", "U", "D"]
even = ["L", "U", "D"]

for i in range(0,len(s),2):
	if s[i] not in odd:
		print("No")
		exit()
		
for j in range(1,len(s),2):
	if s[j] not in even:
		print("No")
		exit()
		
print("Yes")

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

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

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

Solution (Python):
S = input()

ans = 'Yes'
for i, s in enumerate(S):
    if (i+1) % 2 == 0:
        if s == 'R':
            ans = 'No'
            break

    else:
        if s == 'L':
            ans = 'No'
            break

print(ans)

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

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

Solution (Python):
t = str(input())
s=0
k=0
for i in range(0,len(t),2):
  if(t[i]=='L'):
    s=1
for i in range(1,len(t),2):
  if(t[i]=='R'):
    k=1
if(s==1):
  print('No')
elif(k==1):
  print('No')
else:
  print('Yes')

Solution (Python):


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

Solution (Python):

S = str(input()) 






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

Solution (Python):
s = input()

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

Solution (Python):
import sys
inputs = input().rstrip()
lst = list(inputs)
flg = True

for i in range(len(lst)):
    if ((i+1) % 2) == 1:
        if (lst[i] == "L"):
            flg = False
            break
    else:
        if (lst[i] == "R"):
            flg = False
            break

if (flg):
    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=list(input())
n=len(S)

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


if __name__ == "__main__":
    
    

    S = input()
    steps_odd = S[0::2]
    steps_even = S[1::2]

    for stp in steps_odd:
        if stp == "L":
            print("No")
            exit()
    for stp in steps_even:
        if stp == "R":
            print("No")
            exit()

    print("Yes")

Solution (Python):
S = input()
o = set(S[::2])
e = set(S[1::2])
so = {'D', 'U', 'R'}
se = {'D', 'U', 'L'}
if o.issubset(so) and e.issubset(se):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
c = 0
for i in range(0,len(s)):
    if s[i] == 'U' or s[i] == 'D':
        continue
    elif s[i] == 'L':
        if i%2 == 1:
            continue
        else:
            c = 1
    else:
        if i%2 == 0:
            continue
        else:
            c = 1
if c == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
s1 = s[0::2]
s2 = s[1::2]
if s1.count("L")==0 and s2.count("R")==0:
    print("Yes")
else:print("No")

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

Solution (Python):
S = input()

flag = 1
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] == 'L':
            flag = -1
            break
    else:
        if S[i] == 'R':
            flag = -1
            break

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

Solution (Python):
s = input()

def tapDance(s_string):

    for i, word in enumerate(s_string):
        if (i + 1) % 2 == 0 and word == "R":
            return "No"
        elif (i + 1) % 2 == 1 and word == "L":
            return "No"

    return "Yes"

print(tapDance(s))

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 = input()
pri = S[::2]
dec = S[1::2]
flag = True

if 'R' in dec:
  flag = False
if flag:
  if 'L' in pri:
    flag = False
print('Yes' if flag else 'No')

Solution (Python):
S=input()
T=(",").join(S)
U=T.split(",")

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

print(ans)

Solution (Python):
S = input()
flag = True
for i in range(len(S)):
  if i%2 != 0 and S[i] == 'R' or i%2 == 0 and S[i] == 'L':
    flag = False

if flag == True:
  print('Yes')
else:
  print('No')

Solution (Python):
import re
s = input()
odd = s[::2]
eve = s[1::2]
odd_re = re.compile(r"^[RUD]*$")
eve_re = re.compile(r"^[LUD]*$")
if odd_re.findall(odd) != [] and eve_re.findall(eve) != []:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
ans = 'Yes'
S = input()
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)

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

Solution (Python):
S = input()
N = len(S)
ans = 'Yes'

for i in range(N):   
    if S[i] == 'R' and (i+1)%2 == 0:
        ans = 'No'
        break
    elif S[i] == 'L' and (i+1)%2 == 1:
        ans ='No'
        break

print(ans)

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

Solution (Python):
import sys
sys.setrecursionlimit(10000000)
def input():
    return sys.stdin.readline()[:-1]
from bisect import *
from collections import *
from heapq import *
from math import *
from itertools import *
INF = 10**10

S = input()
N = len(S)
s1 = [S[i] for i in range(0, N, 2)]
s2 = [S[i] for i in range(1, N, 2)]
if 'L' in s1 or 'R' in s2:
    print('No')
else:
    print('Yes')

Solution (Python):
import sys
 
t = input()
 
t1 = t[0::2]
t2 = t[1::2]
if "L" in t1:
  print("No")
else:
  if "R" in t2:
    print("No")
  else:
    print("Yes")

Solution (Python):
s = input().rstrip()
s_len = len(s)
flag = 0
for i in range(s_len):
  if i%2==0:
    if s[i]=="L":
      flag = -1
  else:
    if s[i]=="R":
      flag = -1
if flag == 0:
  print("Yes")
else:
  print("No")

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

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

flag = False
for i in range(N):
    if i%2 == 0:
        if S[i] == "L":
            flag = True
            break

    else:
        if S[i] == "R":
            flag = True
            break

if flag:
    print("No")

else:
    print("Yes")

Solution (Python):
odds = ["R", "U", "D"]
evens = ["L", "U", "D"]

s = input()
is_passed = True

for index, c in enumerate(s):
    if index % 2 == 0:
        if not c in odds:
            is_passed = False
    else:
        if not c in evens:
            is_passed = False

print("Yes" if is_passed else "No")

Solution (Python):
S=list(input())
S_odd=S[0::2]
S_even=S[1::2]

flag=True
for s_odd in S_odd:
    if not s_odd in ['R','U','D']:
        flag=False
        break
for s_even in S_even:
    if not s_even in ['L','U','D']:
        flag=False
        break
if flag==True:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
s = input()

flag = False
for i in range(len(s)):
    if (i % 2 == 1 and s[i] == 'R') or (i % 2 == 0 and s[i] == 'L'):
        flag = True
        break
if flag:
    print('No')
else:
    print('Yes')

Solution (Python):
def solve(string):
    s = string
    return "No" if "L" in s[::2] or "R" in s[1::2] else "Yes"


if __name__ == '__main__':
    print(solve(input()))

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

Solution (Python):
s_list = [s for s in input()]

s_odd = s_list[0::2]
s_even = s_list[1::2]


if 'L' in s_odd or 'R' in s_even:
    print('No')
else:
    print('Yes')

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

Solution (Python):
import sys

S = input()
TAP = 'x'

TAP += S

for i in range(1,len(S)+1):
  if i % 2 == 1:
    if TAP[i] != 'R' and TAP[i] != 'U' and TAP[i] != 'D':
      print('No')
      sys.exit()
  else:
    if TAP[i] != 'L' and TAP[i] != 'U' and TAP[i] != 'D':
      print('No')
      sys.exit()

print('Yes')

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

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

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

print("Yes")

Solution (Python):
import sys

s = sys.stdin.readline().strip()

def solve(s):
	n = len(s)
	for i in range(n):
		if i%2==0:
			if s[i] == "L":
				return False
		else:
			if s[i] == "R":
				return False
	return True

print("Yes" if solve(s) else "No")

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

Solution (Python):
S=" "+input()
res="Yes"
for i in range(1, len(S)):
  if (i&1==0 and S[i]=="R") or (i&1==1 and S[i]=="L"):
    res="No"
    break
print(res)

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

S_even = []
S_odd = []

for i in range(0,len(S)):
    if i%2 == 0:
        S_even.append(S[i])
    else:
        S_odd.append(S[i])

if 'L' in S_even:
    print('No')
elif 'R' in S_odd:
    print('No')
else:
    print('Yes')