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):
a = list(input())
n = len(a)
count = 0
for i in range(0,n,2):
    if a[i] == 'R' or a[i] == 'U' or a[i] == 'D':
        count += 1
for j in range(1,n,2):
    if a[j] == 'L' or a[j] == 'U' or a[j] == 'D':
        count += 1
if count == n:
    print("Yes")
else:
    print("No")

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

Solution (Python):
s = input()
flag = True
for i, j in enumerate(s):
    if ( i+1) % 2 == 0:
        if not(j == "L" or j =="U" or j == "D"):
            flag = False
    else:
        if not(j == "R" or j =="U" or  j == "D"):
            flag = False
if flag:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys

S = input()
odd = ["R", "U", "D"]
even = ["L", "U", "D"]

for i, c in enumerate(S):
    if i % 2 == 0:
        if not c in odd:
            print('No')
            sys.exit()
    else:
        if not c in even:
            print('No')
            sys.exit()

print('Yes')

Solution (Python):
S=input(); n=1; k=['R','U','D']; g=['L','U','D']
for i in S:
    if n%2==1:
        if i not in k:
            print('No')
            exit()
    else:
        if i not in g:
            print('No')
            exit()
    n+=1
print('Yes')

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

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

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

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

Solution (Python):
S = input()

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

Solution (Python):
a = input()

iseasy = "Yes"
odd_l = ["R","U","D"]
even_l = ["L","U","D"]
try:
	for i in range(0,int(len(a)/2+1)):
		if a[2*i] in odd_l: 
			pass
		else: 
			iseasy = "No"
			break
		if a[2*i+1] in even_l: 
			pass
		else:
			iseasy = "No"
			break
except IndexError as e:
	pass
print(iseasy)

Solution (Python):
s = input().strip()

answer = "Yes"

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

print(answer)

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

S_1 = S[0::2]
S_2 = S[1::2]

if "L" not in S_1 and "R" not in S_2:
  print("Yes")
else:
  print("No")

Solution (Python):
S = list(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):
step = str(input())

odds = step[0:len(step):2]
even = step[1:len(step):2]

if "L" not in odds and "R" not in even:
    answer = "Yes"
else:
    answer = "No"

print(answer)

Solution (Python):
S = input()
check = 0
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] not in ['R', 'U', 'D']:
            check = 1
    else:
        if S[i] not in ['L', 'U', 'D']:
            check = 1
if check == 1:
    print('No')
else:
    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()

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

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

Solution (Python):
S = input()
flag = True
for i in range(len(S)):
    if (i+1) % 2 == 1:
        if not(S[i] in ('RUD')):
            
            flag = False
            break
    else:
        if not(S[i] in ('LUD')):
            
            flag = False
            break

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

Solution (Python):
S=list(input())
A=[]
B=[]
i=0
while i<len(S):
    if i%2==0:
        A += S[i]
    else:
        B += S[i]
    i+=1
if 'L' in A:
    print('No')
elif 'R' in B:
    print('No')
else:
    print('Yes')

Solution (Python):
x = input()
y = len(x)

def main(x,y):
  
  for i,st in enumerate(x):
    if (i+1)%2 == 0:
      if st == 'R':
        return "No"
    else:
      if st == 'L':
         return "No"
  return "Yes"

res = main(x,y)
print(res)

Solution (Python):
d_list = list( input("") )
i = 0
while(i < len(d_list) ):
  if i % 2 == 0:
    if d_list[i] == "L":
        break
  if i % 2 == 1:
    if d_list[i] == "R":
        break
  i += 1

if i == len(d_list):
  print("Yes")
else:
  print("No")

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

Solution (Python):
S = input()
N = int(len(S))
i = 0
j = 0
K = []
I = []
while (2*i+1) < N:
    if S[(2*i+1)] == "L":
        K.extend([S[(2*i+1)]])
    elif S[(2*i+1)] == "U":
        K.extend([S[(2*i+1)]])
    elif S[(2*i+1)] == "D":
        K.extend([S[(2*i+1)]])
    i += 1
while (2*j) < N:
    if S[(2*j)] == "R":
        I.extend([S[(2*j)]])
    elif S[(2*j)] == "U":
        I.extend([S[(2*j)]])
    elif S[(2*j)] == "D":
        I.extend([S[(2*j)]])
    j += 1
if int(len(K)) + int(len(I)) == N:
    print("Yes")
else:
    print("No")

Solution (Python):
s = list(input())
flag = True
odd = ["R", "U", "D"]
even = ["L", "U", "D"]
for i in range(len(s)):
    if (i+1) % 2 == 1:
        if not(s[i] in odd):
            flag = False
    else:
        if not (s[i] in even):
            flag = False

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

Solution (Python):
S = input()
flg = True

for i in range(len(S)):
    if i % 2 == 0 and S[i] == 'L':
        flg = False
    if i % 2 == 1 and S[i] == 'R':
        flg = False

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

Solution (Python):
s =input()
l, i  = len(s) + 1, 1
while i < l:
    if i % 2:
        if  s[i - 1] == 'L':
            break
    else:
        if s[i - 1] == 'R':
            break
    i += 1
if i == l:
    print('Yes')
else:
    print('No')

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

for i, chr in enumerate(s):
    if (i%2 == 0 and chr == "L") or (i%2 == 1 and chr == "R"):
        print("No")
        exit()
    else:
        continue
print("Yes")

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

Solution (Python):
S = input()

s = []
for i in S:
  s.append(i)

cnt = 0
for i in range(len(S)):
  if i%2==1:
    if (s[i] == 'L')or(s[i] == 'U')or(s[i] == 'D'):
      cnt += 0
    else:
      cnt += 1
      break
  else:
    if (s[i] == 'R')or(s[i] == 'U')or(s[i] == 'D'):
      cnt += 0
    else:
      cnt += 1
      break
if cnt == 0:
  print('Yes')
else:
  print('No')

Solution (Python):
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 len(s)==count:
  print("Yes")
else:
  print("No")

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

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

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

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

ans='Yes'
if l%2==0:
  h=int(l/2)
  for i in range(0,h):
    if S[2*i]=='L':
      ans='No'
      break
  for i in range(0,h):
    if S[2*i+1]=='R':
      ans='No'
      break
elif l==1:
  if S[0]=='L':
    ans='No'
else:
  h=int((l+1)/2)
  for i in range(1,h):
    if S[2*i-1]=='R':
      ans='No'
      break
  for i in range(0,h):
    if S[2*i]=='L':
      ans='No'
      break

print(ans)

Solution (Python):
S = input()
N = len(S)
i = 0
while True:
    if i%2==0:
        if S[i]=='L':
            print('No')
            break
    elif i%2==1:
        if S[i]=='R':
            print('No')
            break
    i = i+1
    if i==N:
        print('Yes')
        break

Solution (Python):
s = input()
for i, char in enumerate(s):
    if i % 2 == 0 and char not in ('R', 'U', 'D'):
        print('No')
        break
    elif i % 2 == 1 and char not in ('L', 'U', 'D'):
        print('No')
        break
else:
    print('Yes')

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    l = list(S)
    odd = all([s in ['R', 'U', 'D'] for s in sorted(list(set(l[0::2])))])
    even = all([s in ['L', 'U', 'D'] for s in sorted(list(set(l[1::2])))])
    print(YES if odd and even else NO)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):
S = input()


char_list = list(S)


num=0
res = True 
for c in char_list:
        num+=1
        if num%2 != 0 :
                if c in  ["R","U","D"]:
                        continue
        else:
                if c in  ["L","U","D"]:
                        continue
        res =False
        break

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

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

ans='Yes'

Odd=[i for i in range(1,len(S)+1) if i%2==1]
Even=[j for j in range(1,len(S)+1) if j%2==0]

Odd_right=['R','U','D']
Even_right=['L','U','D']

for k in Odd:
    if S[k-1] not in Odd_right:
        ans='No'

for l in Even:
    if S[l-1] not in Even_right:
        ans='No'

print(ans)

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

for i, j in enumerate(S, 1):
    if i % 2 == 0 and j == 'R':
        print('No')
        exit()
    elif i % 2 != 0 and j == 'L':
        print('No')
        exit()
print('Yes')

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

for i, j in enumerate(S, 1):
    if i % 2 == 0 and j == 'R':
        print('No')
        exit()
    elif i % 2 != 0 and j == 'L':
        print('No')
        exit()
print('Yes')

Solution (Python):
s = input()
odd = []
even =[]
flag = "Yes"
for i in range(1,len(s)+1):
    if i % 2 != 0:
        odd.append(s[i-1])
    else:
        even.append(s[i-1])
if "L" in odd:
    flag = "No"
if "R" in even:
    flag = "No"
print(flag)

Solution (Python):
S=input()

p=True
q=True
for i in S:
  if p:
    if not i=='L':
      p=False
    else:
      q=False
      break
  else:
    if not i=='R':
      p=True
    else:
      q=False
      break

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

Solution (Python):

def solve(S):
    index = 1
    for word in S:
        if index % 2 != 0 and word == 'L':
            return 'No'
        elif index % 2 == 0 and word == 'R':
            return 'No'
        index += 1

    return 'Yes'


S = input()
print(solve(S))

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

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

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

S_odd = S[::2]
S_even = S[1::2]

LinO = 'L' in S_odd
RinE = 'R' in S_even

if LinO == True or RinE == True:
	print('No')
else:
	print('Yes')

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


def dance_checker(S):
    N = len(S)
    for i in range(N):
        if i % 2 == 0:
            if S[i] == "L":
                return("No")
        else:
            if S[i] == "R":
                return("No")

    return("Yes")


print(dance_checker(S))

Solution (Python):
"""
author : halo2halo
date : 18,Oct,2019
"""

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

S = readline().rstrip()
ans = 'Yes'
for i in range(len(S)):
    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 = list(input())
for i, s in enumerate(S):
    
    if i % 2 == 0:
        if s == 'L':
            ans = 'No'
            break
    if i % 2 == 1:
        if s == 'R':
            ans = 'No'
            break
else:
    ans = 'Yes'
print(ans)

Solution (Python):
S = input()

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

Solution (Python):
s = input()

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

Solution (Python):
n = input()
a = n[0::2]
b = n[1::2]
odd = ['R', 'U', 'D']
even  = ['L', 'U', 'D']
core = 0
for i in a:
    if not i in odd:
        core +=1
for j in b:
    if not j in even:
        core += 1
        
if core ==0:
    print('Yes')
else:
    print('No')

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

Solution (Python):
s = input()
def f(s):
    even = False
    for c in s:
        if(even):
            if(c == 'R'):
                return 'No'
            even = False
        else:
            if(c == 'L'):
                return 'No'
            even = True
    return 'Yes'
print(f(s))

Solution (Python):
S = input ()

even_clear = 0
odd_clear = 0
number = 1

for value in S:
    if number % 2 == 0 and  not value == "R":
        even_clear += 1

    elif number % 2 == 1  and not value == "L":
        odd_clear += 1
    number += 1

number_pop = number - 1

if number_pop == (even_clear + odd_clear):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
a = []
b = []
n = 0

if len(s) % 2 == 1:
    for i in range((len(s) // 2) + 1):
        a.append(s[2 * i])
else:
    for i in range(len(s) // 2):
        a.append(s[2 * i])
    
for i in range(len(s) // 2):
    b.append(s[2 * i + 1])
    
for i in range(len(a)):
    if a[i] == "L":
        n += 1
        
for i in range(len(b)):
    if b[i] == "R":
        n += 1
        
if n > 0:
    print("No")
else:
    print("Yes")

Solution (Python):
S=list(input())
BEST_ODD = ['R', 'U', 'D']
BEST_EVEN = ['L', 'U', 'D']
ANS = 'Yes'
for i,s in enumerate(S):
  o_or_e = (i + 1) % 2
  if o_or_e == 0 and s in BEST_EVEN:
    pass
  elif o_or_e == 1 and s in BEST_ODD:
    pass
  else:
    ANS = 'No'
    break
print(ANS)

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):
s=list(input())
ans="Yes"
cnt=1
for a in s:
    if cnt%2==0:
        if a =="R":
            ans="No"
    else:
        if a=="L":
            ans = "No"
    cnt+=1
print(ans)

Solution (Python):
S = input()
for idx, s in enumerate(S, start=1):
    if idx % 2 == 1 and s == 'L':
        print('No')
        exit(0)
    elif idx % 2 == 0 and s == 'R':
        print('No')
        exit(0)
print('Yes')

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

Solution (Python):
S_list = list(input())
odd_list = S_list[0::2]
even_list = S_list[1::2]
ans = 'Yes'
for s in even_list:
    if s not in ['L', 'U', 'D']:
        ans = 'No'
for s in odd_list:
    if s not in ['R', 'U', 'D']:
        ans = 'No'
print(ans)

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


if __name__ == '__main__':
    main()

Solution (Python):
list_all = list(input())  
odd = list_all[0::2]
even = list_all[1::2]

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

Solution (Python):
S = input()
Odd = ["R", "U", "D"]
Even = ["L", "U", "D"]
f = 0
for index, i in enumerate(S):
    if index % 2 == 0:
        if i == "R" or i == "U" or i == "D":
            pass
        else:
            f = 1
            break
    else:
        if i == "L" or i == "U" or i == "D":
            pass
        else:
            f = 1
            break

if f == 1:
    print("No")

else:
    print("Yes")

Solution (Python):
S = input().strip()
odl = ['R', 'U', 'D']
evl = ['L', 'U', 'D']
print('Yes') if all([c in odl for c in S[::2]]) and all([c in evl for c in S[1::2]]) else print('No')

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

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

Solution (Python):

s = input()

kisu = []
gusu = []
for i in range(len(s)):
    if i % 2 == 0:
        kisu.append(s[i])
    else:
        gusu.append(s[i])


if kisu.count("L") == 0:
    if gusu.count("R") == 0:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
s = input()
for i, c in enumerate(s):
    if (i % 2 and c == 'R') or (not i % 2 and c == 'L'):
        print('No')
        exit()
print('Yes')

Solution (Python):
s = input()

ch = 1

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

Solution (Python):
S = list(map(str, input()))
unreadble = 0
for i in range(len(S)):
  if i % 2 == 0:
    if S[i] == "L":
      unreadble += 1
  else:
    if S[i] == "R":
  	  unreadble += 1
if unreadble >= 1:
  print("No")
else:
  print("Yes")

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

Solution (Python):
S = list(map(str,input()))
i = 0
ans = 0
for i in range(len(S)):
  if (i+1)%2 == 1:
    if S[i] == "L":
      ans = ans + 1
  else:
    if S[i] == "R":
      ans = ans + 1
if ans == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
S = input()

is_yes = 'Yes'
for num, s in enumerate(S, start=1):
  if num % 2:
    if s == 'L':
      is_yes = 'No'
  else:
    if s == 'R':
      is_yes = 'No'

print(is_yes)

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

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

Solution (Python):
S = input()

if all([not 'L'==i  for i in S[0::2]]) and all([not 'R'==i for i in S[1::2]]):
    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"
            break
    if i%2!=0:
        if s[i]=="R":
            ans="No"
            break
print(ans)

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

Solution (Python):
S = input()

answer = 'Yes'

for i in range(len(S)):
    if (i % 2 == 0 and S[i] == 'L') or (i % 2 == 1 and S[i] == 'R'):
        answer = 'No'
        break

print(answer)

Solution (Python):
s=input()
for i in range(len(s)):
    if s[i]=='R'and i%2==1:
        print('No')
        exit()
    if s[i]=='L' and i%2==0:
        print('No')
        exit()
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":
            pass
        else:
            print("No")
            exit(0)
    else:
        if S[i] == "L" or S[i] == "U" or S[i] == "D":
            pass
        else:
            print("No")
            exit(0)
print("Yes")

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

Solution (Python):
s = input()



def yesNo(s):
	for index, char in enumerate(s):
		if index%2==0:
			if char=='L':
				return 'No'
		else:
			if char=='R':
				return 'No'
	return 'Yes'

print(yesNo(s))

Solution (Python):
def main():
    array = list(input())
    for i, s in enumerate(array):
        if (i+1) % 2 == 0:
            if array[i] == 'R':
                print('No')
                return
            else:
                continue
        else:
            if array[i] == 'L':
                print('No')
                return
            else:
                continue
    print('Yes')



if __name__ == '__main__':
    main()

Solution (Python):
s = input()
odd = set(s[::2])
if "L" in odd:
  print("No")
  exit()
even = set(s[1::2])
if "R" in even:
  print("No")
  exit()
print("Yes")

Solution (Python):
s = input()
kisu = []
gusu = []
check = 1
judge = True
for i in s:
    if check == 1:
        kisu.append(i)
        check = 0
    else:
        gusu.append(i)
        check = 1
if kisu.count("L") >= 1:
    judge = False
if gusu.count("R") >= 1:
    judge = False

if judge == True:
    print("Yes")
else:
    print("No")

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

Solution (Python):
s = input()


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

Solution (Python):
s = input()



for i in s[0::2]:
    if(i not in ['R','U','D']):
        print('No')
        exit()

for i in s[1::2]:
    if(i not in ['L','U','D']):
        print('No')
        exit()
        
print('Yes')

Solution (Python):
S = input()

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

Solution (Python):
S = input()
_ans = 0
_S = len(S)
for s in range(0,_S):
  X = (s) % 2
  if X == 1 :
    if S[s] == 'R':
      _ans += 1
     
  if X == 0 :
    if S[s] == 'L' :
      _ans += 1
  
  
if _ans >= 1:
  print ('No')
elif _ans ==0:
  print ('Yes')

Solution (Python):
s = input()
odd_step = ['R', 'U', 'D']
even_step = ['L', 'U', 'D']
number_of_step = len(s)
result = False
for i in range(1, len(s)+1):
    if (i % 2 == 1 and s[i-1] in odd_step) or (i % 2 == 0 and s[i-1] in even_step):
        result = True
    else:
        result = False
        break
if result:
    print('Yes')
else:
    print('No')

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

Solution (Python):
S = input()
f = True
for s, i in zip(S, range(1, len(S) + 1)):
    if i % 2 == 0:
        if s == "R":
            f = False
            break
    else:
        if s == "L":
            f = False
            break
if f:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
Sl = list(S)
o = Sl[0::2]
e = Sl[1::2]

if 'R' in e or 'L' in o:
    print('No')
else:
    print('Yes')

Solution (Python):
r = list(input())
n = len(r)
k = r[0:n:2]
g = r[1:n:2]
if 'L' not in k and 'R' not in g:
    print('Yes')
else:
    print('No')

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


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

Solution (Python):
S = input()

T = list(S)
k = 0
g = 0

i = 0
while i < len(T):
    if (i + 1) % 2 == 1 and T[i] == 'L':
        k = 1
    elif (i + 1) % 2 == 0 and T[i] == 'R':
        g = 1
    i += 1

if k == 0 and g == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
N = input()
b=0

for i in range (len(N)):
    if i%2==0:
        if N[i]=="L":
            b=1
    else:
        if N[i]=="R":
            b=1

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

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

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()

print(
    "Yes" if all(
        [l in ("R", "U", "D")
         for l in S[::2]] + [r in ("L", "U", "D") for r in S[1::2]]
    ) else "No"
)

Solution (Python):
import sys

s = list(input())

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

print("Yes")

Solution (Python):

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

Solution (Python):
S = input()
odd = {'R', 'U', 'D'}
even = {'L', 'U', 'D'}
isEasy = "Yes"
for i in range(0,len(S)):
  isEven = (i + 1) % 2 == 0
  if (isEven and S[i] not in even) or not isEven and S[i] not in odd:
    isEasy = "No"
print(isEasy)

Solution (Python):
S = input()
even = ['R','U','D']
odd = ['L','U','D']
if all(c in even if i%2==0 else c in odd for i,c in enumerate(S)):
    print('Yes')
else:
    print('No')

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

Solution (Python):

def main():
    S = input()
    for i in range(len(S)):
        if i % 2 == 0:
            if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
                pass
            else:
                print("No")
                exit()
        else:
            if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
                pass
            else:
                print("No")
                exit()
    print("Yes")


if __name__ == "__main__":
    main()

Solution (Python):
S = input()

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

Solution (Python):
s = input()
m = 'Yes'
for i, c in enumerate(s):
  if i % 2 == 0:
    if c == 'L':
      m = 'No'
      break
  else:
    if c == 'R':
      m = 'No'
      break
print(m)

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

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

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

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

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

Solution (Python):

N = input()

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

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

print("Yes")

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    flag = YES
    if 'L' in S[::2] or 'R' in S[1::2]:
        flag = NO
    print(flag)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)


if __name__ == '__main__':
    main()

Solution (Python):
def judge(s):
  for i in range(0,len(s),2):
    if s[i]=='L':
      return "No"
  for j in range(1,len(s),2):
    if s[j]=='R':
      return "No"
  return "Yes"

s=input()
print(judge(s))

Solution (Python):
def t(s):
    a = tuple(enumerate(s))
    return 'No' if 'R' in [j for i, j in a if i % 2 != 0] or 'L' in [j for i, j in a if i % 2 == 0] else 'Yes'


if __name__ == "__main__":
    print(t(input()))

Solution (Python):
a = input()
b = list(a)
count = 0

for i in range(0, len(b)):
    if i % 2 == 0 and b[i] == 'L':
        count += 1
        print('No')
        break
    if i % 2 == 1 and b[i] == 'R':
        count += 1
        print('No')
        break
if count == 0:
    print('Yes')

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

S = input()

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

Solution (Python):
S = list(input())
L = len(S)
ans = 1

for i in range(L):
    if i % 2 == 0:
        if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
            continue
        else:
            ans = 0
    else:
        if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
            continue
        else:
            ans = 0

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

Solution (Python):
S = input()
s1 = set(S[0::2])
s2 = set(S[1::2])
if s1.issubset(set("RUD")) and s2.issubset(set("LUD")):
  print("Yes")
else:
  print("No")

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