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()
len_s=len(s)
cnt=0
for i in range(len_s):
    if i%2==0 and s[i]=="L":
        cnt+=1
    if i%2!=0 and s[i]=="R":
        cnt+=1
if cnt!=0:
    print("No")
else:
    print("Yes")

Solution (Python):
S = input()

EVEN = 'L'
ODD = 'R'

L = list(S)
for i in range(len(L)):
    if L[i] in ['U', 'D']:
        continue
    if (i + 1) % 2 == 0:
        if L[i] != EVEN:
            print("No")
            exit()
    else:
        if L[i] != ODD:
            print("No")
            exit()
print("Yes")

Solution (Python):
s = input()

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

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 != 0 and s[i] == "R":
        print("No")
        exit()

print("Yes")

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

flg = 0

for i in range(len(s)):
    if i % 2 ==1:
        if str(s[i]) == "R":
            flg = 1
    else:
        if str(s[i]) == "L":
            flg = 1

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

Solution (Python):
s=input()
side='R'
flag=True
for x in s:
  if x==side or x in ('U','D'):
    side='L' if side=='R' else 'R'
    continue
  else:
    flag=False
print('Yes' if flag else 'No')

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

Solution (Python):
n=list(input())
a=1
for i in n:
    if not ((a%2==1 and (i=="R" or i == "U" or i == "D")) or (a%2==0 and (i=="L" or i == "U" or i == "D"))):
        print("No")
        exit()
    a+=1
print("Yes")

Solution (Python):


S = input()

ans = "No"

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

print(ans)

Solution (Python):
def main():
    S = input()
    s_odd = [S[i] for i in range(0, len(S), 2)]  
    s_even = [S[i] for i in range(1, len(S), 2)]  
    if "R" in s_even: print("No"); return
    if "L" in s_odd: print("No"); return
    print("Yes")
 
if __name__ == "__main__":
    main()

Solution (Python):
def main():
    S = input()
    s_even = [S[i] for i in range(0, len(S), 2)]  
    s_odd = [S[i] for i in range(1, len(S), 2)]  
    if "L" in s_even: print("No"); return
    if "R" in s_odd: print("No"); return
    print("Yes")

if __name__ == "__main__":
    main()

Solution (Python):

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

if __name__ == "__main__":
    main()

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

print(ans)

Solution (Python):
s = input()

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

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

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

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

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

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

if flag==0:
  print('No')
elif flag==1:
  print('Yes')

Solution (Python):
S = input().strip()
for i,c in enumerate(S):
  if (i % 2 == 0 and c == 'L') or (i % 2 == 1 and c == 'R'):
    print('No')
    exit()
print('Yes')

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

Solution (Python):
S = list(input())
Even = ["L","U","D"]
Odd = ["R", "U", "D"]
for i in range(len(S)):
  if (i+1) % 2 == 0 and S[i] not in Even:
    print("No")
    exit()
  elif (i+1) % 2 != 0 and S[i] not in Odd:
    print("No")
    exit()
print("Yes")

Solution (Python):
s = input()

e=0
for x in range(0, len(s)):
  if x%2==0 and s[x] == 'L':
    e = 1

o=0
for y in range(0, len(s)):
  if y%2!=0 and s[y] == 'R':
    o = 1
    
if e==1 or o==1:
  print('No')

else:
  print('Yes')

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

Solution (Python):
import sys

S = list(map(str, input()))

for x in range(0, len(S), 2):
    if(S[x]=='L'):
        print('No')
        sys.exit()

for y in range(1, len(S), 2):
    if(S[y]=='R'):
        print('No')
        sys.exit()

print('Yes')

Solution (Python):
S = input()
N = len(S)
for i in range(N):
    if i % 2 == 0:
        if not S[i] in 'RUD':
            print('No')
            exit()
    else:
        if not S[i] in 'LUD':
            print('No')
            exit()

print('Yes')

Solution (Python):
s = input()

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

Solution (Python):
import re

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

Solution (Python):
S = input()

def stringDevider(S):    
    odd_letters = [S[l] for l in range(len(S)) if l % 2 == 0] 
    even_letters = [S[l] for l in range(len(S)) if l % 2 == 1] 
    
    return odd_letters, even_letters

odd_letters, even_letters = stringDevider(S)

if 'L' not in odd_letters and 'R' not in even_letters:
    print('Yes')
else :
    print('No')

Solution (Python):
S = list(input())
Flag = True
for i in range(0,len(S)):
  if i % 2 == 1:
    a = S[i]
    if Flag == True and a == 'R':
       Flag = False
  else:
    b = S[i]
    if Flag == True and b == 'L':
       Flag = False
if Flag == True:
  print('Yes')
else:
  print('No')

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

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

Solution (Python):
s = input()

flag = 1

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

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

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

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

Solution (Python):
s = input()

s = list(s)

test = 0

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

print('Yes' if test == 0 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()

answer = "Yes"

for i in range(len(s)):
	if i % 2 == 0:
		if s[i] not in ["R", "U", "D"]:
			answer = "No"
	else:
		if s[i] not in ["L", "U", "D"]:
			answer = "No"
	if answer == "No":
		print(answer)
		exit()
print(answer)

Solution (Python):
li=list(str(input()))
cnt=1
for l in li:
  if(cnt%2==0):
    if(l=="L" or l=="U" or l=="D"):
      cnt+=1
    else:
      print("No")
      break
  else:
    if(l=="R" or l=="U" or l=="D"):
      cnt+=1
    else:
      print("No")
      break
if(cnt==len(li)+1):
  print("Yes")

Solution (Python):
def check():
    S = input()
    a = 1
    
    for s in S:
        if a % 2 == 0:
            if s == 'R':
                return 'No'
        else:
            if s == 'L':
                return 'No'
        a += 1
    return 'Yes'
  
print(check())

Solution (Python):
S=input()
j=0
refO=set(["R","U","D"])
refE=set(["L","U","D"])
for i in range(len(S)):
  if i%2==1 and (S[i] in refE):
    j+=1
  elif i%2==0 and (S[i] in refO):
    j+=1
  else:
    break
if j==len(S):
  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()

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

Solution (Python):
import numpy as np
S = input()
result = ["No", "Yes"]
print(result[np.array([s in list("RUD") if i%2==0 else s in list("LUD") for i, s in enumerate(S)]).all().astype(int)])

Solution (Python):
ok = True
a= input()
for i in range(len(a)):
  if i % 2 == 0:
    if a[i] not in 'RUD':
      ok = False
  else:
    if a[i] not in 'LUD':
      ok = False

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

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
def MAP(): return [int(s) for s in input().split()]

if sys.platform =='ios':
	sys.stdin=open('Untitled.txt')


easy = True
S = input()
for i in range(len(S)):
	
	if not i%2 and S[i] in 'RUD':
		continue
	if i%2 and S[i] in 'LUD':
		continue
	easy = False

print('Yes' if easy else 'No')

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

Solution (Python):
A = input()
ODD =['R', 'U', 'D']
EVEN =['L', 'U', 'D']
Result = True
for i in range(len(A)):
  if i % 2 ==0:
    Result = Result and (A[i] in ODD)
  else:
    Result = Result and (A[i] in EVEN)
if Result:
  print('Yes')
else:
  print('No')

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

Solution (Python):
s = input()
s_odd = s[::2]
s_even = s[1::2]
if s_odd.find('L') == -1 and s_even.find('R') == -1:
    print('Yes')
else:
    print('No')

Solution (Python):
s=input()
t={'R','L','U','D'}
s_odd=''.join(x for i,x in enumerate(s) if i%2==0)
s_even=''.join(x for i,x in enumerate(s) if i%2!=0)
print('No' if len(set(s)-t) or 'L' in s_odd or 'R' in s_even else 'Yes')

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

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

for x in S[0::2]:
    if x == 'L':
        print('No')
        exit()

for y in S[1::2]:
    if y == 'R':
        print('No')
        exit()

print('Yes')

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

A = []

for x in S[0::2]:
    if x in ['R', 'U', 'D']:
        A.append('Yes')
    else:
        A.append('No')

for y in S[1::2]:
    if y in ['L', 'U', 'D']:
        A.append('Yes')
    else:
        A.append('No')



if 'No' not in A:
    print('Yes')
else:
    print('No')

Solution (Python):
def no():
    print("No")
def yes():
    print("Yes")

s=input().rstrip()
len=len(s)

for i in range(0,len):
    if i%2==0:
        if(s[i]=="L"):
            no()
            exit()
    else:
        if(s[i]=="R"):
            no()
            exit()
yes()

Solution (Python):
def no():
    print("No")
def yes():
    print("Yes")

s=input().rstrip()
len=len(s)

for i in range(0,len):
    if i%2==0:
        if(s[i]=='L'):
            no()
            exit()
    else:
        if(s[i]=='R'):
            no()
            exit()
yes()

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

A = []

for x in range(len(S)):
    if x % 2 == 0:
        if S[x] in ['R', 'U', 'D']:
            A.append('Yes')
        else:
            A.append('No')
    elif x % 2 == 1:
        if S[x] in ['L', 'U', 'D']:
            A.append('Yes')
        else:
            A.append('No')



if 'No' not in A:
    print('Yes')
else:
    print('No')

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

Solution (Python):
s = input()

print("YNeos"[not(s[0::2].find('L')==-1 and s[1::2].find('R')==-1)::2])

Solution (Python):
s = input()
s_odd = s[0::2]
s_even = s[1::2]

print("YNeos"[not(s_odd.find('L')==-1 and s_even.find('R')==-1)::2])

Solution (Python):
import sys
input = sys.stdin.readline

_s = input()[:-1]


def chker(s):
    rs = s[::2]
    ls = s[1::2]

    if 'L' in rs:
        print('No')
        return

    if 'R' in ls:
        print('No')
        return

    print('Yes')


chker(_s)

Solution (Python):
s = input()

o = s[0::2]
e = s[1::2]



if 'L' in o:
    print('No')
    exit()

if 'R' in e:
    print('No')
    exit()

print('Yes')

Solution (Python):
s = input()
list_s = list(s)
odd_list = ['R','U','D']
even_list= ['L','U','D']
identifier = [] 
for i in range(1,len(list_s)+1):
    if s[i-1] in even_list and i % 2 == 0: 
            identifier.append(1) 
    if i % 2 != 0 and s[i-1]in odd_list:
            identifier.append(1)
if identifier == [1]*len(list_s):
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

flag = True

for i in range(len(S)):
    
    if i%2==0:
        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()
n = len(s)
for i in range(n):
    if i%2 == 0: 
        if s[i] == "L":
            print("No")
            exit()
    else: 
        if s[i] == "R":
            print("No")
            exit()
print("Yes")

Solution (Python):
S = str(input())
for i in range(1, len(S), 2):
    if S[i] == "L" or S[i] == "U" or S[i] == "D":
        continue
    else:
        print("No")
        exit()
for i in range(0, len(S), 2):
    if S[i] == "R" or S[i] == "U" or S[i] == "D":
        continue
    else:
        print("No")
        exit()
print("Yes")

Solution (Python):
import numpy

S = input()
isContinue = True

for i in range(0, len(S), 2):
    if isContinue and S[i] not in ['R', 'U', 'D']:
        print('No')
        isContinue = False

for i in range(1, len(S), 2):
    if isContinue and S[i] not in ['L', 'U', 'D']:
        print('No')
        isContinue = False

if isContinue:
    print('Yes')

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

Solution (Python):
S = list(input())
odd_easy_steps = ["R", "U", "D"]
event_easy_steps = ["L", "U", "D"]
is_easy_step = True
for i, s in enumerate(S):
    index = i + 1
    if index % 2 == 0 and s not in event_easy_steps:
        is_easy_step = False
        break
    elif index % 2 != 0 and s not in odd_easy_steps:
        is_easy_step = False
        break
print("Yes" if is_easy_step else "No")

Solution (Python):
odd_steps = ['R', 'U', 'D']
even_steps = ['L', 'U', 'D']

S = input()

flg = True
for i in range(len(S)):
    if (i + 1) % 2 == 1 and S[i] not in odd_steps:
        flg = False
        break

    if (i + 1) % 2 == 0 and S[i] not in even_steps:
        flg = False
        break

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

Solution (Python):
odd_steps = ['R', 'U', 'D']
even_steps = ['L', 'U', 'D']

S = input()

flg = 1
for i in range(len(S)):
    if (i + 1) % 2 == 1:
        if S[i] not in odd_steps:
            flg = 0
            break
    if (i + 1) % 2 == 0:
        if S[i] not in even_steps:
            flg = 0
            break

print('Yes') if flg == 1 else print('No')

Solution (Python):
s = str(input())
i = 0
count = 0
while(i < len(s)):
    if((i+1)%2 == 0 and s[i] == 'R'):
        count += 1
    if((i+1)%2 == 1 and s[i] == 'L'):
        count += 1
    i += 1
if(count == 0):
    print('Yes')
else:
    print('No')

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

if "L" in s[::2]:
    print("No")
    exit()

if "R" in s[1::2]:
    print("No")
    exit()

print("Yes")

Solution (Python):

s = input()
for i , val in enumerate(s):
    if i % 2==0 and val == "L":
        print("No")
        break
    elif  i % 2==1 and val == "R":
        print("No")
        break
else: print("Yes")

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

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

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

SA = S[0::2]
SB = S[1::2]
c =0

A = ["R","U","D"]
B = ["L","U","D"]

for i in SA:
  if i in A:
    continue
  else:
    c =1
    break
      
for i in SB:
  if i in B:
    continue
  else:
    c =1
    break
    
if c == 1:
  print("No")
else:
  print("Yes")

Solution (Python):
S = list(map(str, input()))

bool = True
i = 0
while i != len(S):
    if i%2 == 0 and S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
        bool = True
        i += 1
    elif i%2 == 1 and S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
        bool = True
        i += 1
    else:
        bool = False
        i = len(S)
        
if bool:
    print('Yes')
else:
    print('No')

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

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

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

Solution (Python):
S = input()
Mylist = list(S)
Rlist = ["R","U","D"]
Llist = ["L","U","D"]
ANSlist = []
for i in range(1,len(Mylist)+1):
    if i%2 == 1:
        if Mylist[i-1] in Rlist:
            ANSlist.append("Y")
    if i%2 == 0:
        if Mylist[i-1] in Llist:
            ANSlist.append("Y")

if len(ANSlist) == len(Mylist):
    
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
s = input()
for i,j in enumerate(s):
    if i%2 == 0:
        if not j in 'RUD':
            print('No')
            sys.exit()
    else:
        if not j in 'LUD':
            print('No')
            sys.exit()
print('Yes')

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

flag = 0

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

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

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

print(ans)

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

if buf != 0 :
    print("No")
else :
    print("Yes")

Solution (Python):

s = input()

easily_odd_position = 'RUD'
easily_even_position = 'LUD'
is_easily = 'Yes'

for idx in range(len(s)):
    if s[idx] == 'R' and idx %2 == 1:
        is_easily = 'No'
    elif s[idx] == 'L' and idx % 2 == 0:
        is_easily = 'No'

print(is_easily)

Solution (Python):

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


YES = "Yes"  
NO = "No"  


def solve(S):
    N = len(S)
    for i in range(0, N, 2):
        if S[i] not in "RUD":
            return False

    for i in range(1, N, 2):
        if S[i] not in "LUD":
            return False

    return True


def main():
    S = input()
    if solve(S):
        print(YES)
    else:
        print(NO)


if __name__ == '__main__':
    main()

Solution (Python):
S = input()
N = len(S)
n = N // 2
ans = 'Yes'
for i in range(n):
    p = S[2*i]
    q = S[2*i+1]
    if p == 'L':
        ans = 'No'
    if q == 'R':
        ans = 'No'
if N % 2 == 1:
    if S[N-1] == 'L':
        ans = 'No'
print(ans)

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

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

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

Solution (Python):

import sys













odd_position = 'RUD'
even_position = 'LUD'

def main():
    s = 'S' + sys.stdin.readline().rstrip() 
    for i in range(1, len(s)-1+1):
        if i % 2 != 0:
            if s[i] in odd_position:
                continue
            else:
                ans = 'No'
                break
        else:
            if s[i] in even_position:
                continue
            else:
                ans = 'No'
                break
    else:
        ans = 'Yes'
    
    print(ans)
     


if __name__ == "__main__":
    main()

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

Solution (Python):
S = list(input())
T = []
for i in range(len(S)):
    if i%2 == 0 :
        if S[i] == "L":
            T.append("A")
        
    if i%2 == 1 :
        if S[i] == "R":
            T.append("B")
if "A" in T or "B" in T:
    print("No")
else :
    print("Yes")

Solution (Python):



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

Solution (Python):
S = list(input())
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']
S_even = S[::2]
S_odd = S[1::2]
ans = True
for i in range(len(S_even)):
    if not S_even[i] in odd:
        ans = False

for j in range(len(S_odd)):
    if not S_odd[j] in even:
        ans = False

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

Solution (Python):
S = list(input())
ki = ["R","U","D"]
gu = ["L","U","D"]
for i in range(len(S)):
    tmp = S[i]
    if (i+1) % 2 == 1:
        if "R" == tmp or "U" == tmp or "D" == tmp:
            continue
        print("No")
        exit()
    else:
        if "L" == tmp or "U" == tmp or "D" == tmp:
            continue
        print("No")
        exit()
print("Yes")

Solution (Python):
s=input()
l=list(s)
lo=[]
le=[]
oc={'R','U','D'}
ec={'L','U','D'}
for i in range(len(s)):
    if i%2==0:
        lo.append(s[i])
    else:
        le.append(s[i])
if oc|set(lo)==oc and ec|set(le)==ec:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
import re


def inpl():
    return list(map(int, input().split()))


S = input()

p = re.compile(r'^([^L][^R])*[^L]?$')

if p.match(S):
    print('Yes')
else:
    print('No')

Solution (Python):
import re


def inpl():
    return list(map(int, input().split()))


S = input()

p = re.compile(r'([^L][^R])*[^L]?$')

if p.match(S):
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
def inpl():
    return list(map(int, input().split()))


S = input()

flag = True
for i in range(len(S)):
    if i % 2 == 0 and S[i] in 'RUD':
        continue
    elif i % 2 == 1 and S[i] in 'LUD':
        continue
    flag = False

print('Yes' if flag is True else 'No')

Solution (Python):
S = input()

if set(S[::2]) <= set("RUD") and set(S[1::2]) <= set("LUD"):
    print("Yes")
else:
    print("No")

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

if flag:
    print('Yes')

else:
    print('No')

Solution (Python):

s = input()
a = True

for i in range(len(s)):
    if (i+1)%2==0:
        if s[i]!='L' and s[i]!='U' and s[i]!='D':
            a = False
            break
    else:
        if s[i]!='R' and s[i]!='U' and s[i]!='D':
            a = False
            break

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

Solution (Python):
def main():
    s = input()
    cnt = True
     
    l_num = s.count('L')
    r_num = s.count('R')
    u_num = s.count('U')
    D_num = s.count('D')
    
    for i in range( len(s) ):
      if s[i] == 'L' and i % 2 == 0:
        cnt = False
      if s[i] == 'R' and i % 2 == 1:
        cnt = False
    
    if cnt == True:
      print("Yes")
    else:
      print("No")
      
if __name__ == '__main__': main()

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

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

Solution (Python):
S=input()
k=['R','U','D']
g=['L','U','D']
t=0
for i in S[0::2]:
    pr=[pr for pr in k if pr==i] 
    if pr==[]:
        print('No')
        t=1
        break

if t==0:
    for i in S[1::2]:
        pr=[pr for pr in g if pr==i] 
        if pr==[]:
            print('No')
            t=1
            break
if t==0:
    print('Yes')

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

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

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

Solution (Python):
S = list(input())
flag=1
for i,x in enumerate(S):
    if (i+1) % 2 == 0:
        if x =='R':
            flag =0
    else:
        if x =="L":
            flag =0
if flag == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

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

Solution (Python):
S = input()
for s in S[0:len(S):2]:
    if s == 'L':
        print('No')
        exit(0)

for s in S[1:len(S):2]:
    if s == 'R':
        print('No')
        exit(0)
        
print('Yes')