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

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 = input()
f = "Yes"
for x in range(len(s)):
	if x%2==0:
		if s[x] == "L":
			f = "No"
			break
	else:
		if s[x] == "R":
			f = "No"
			break

print(f)

Solution (Python):
S = input()
count = 0
flag = 0
for s in S:
    count += 1
    if count % 2 == 1:
        if s != "R" and s != "U" and  s != "D":
            flag = 1
    if count % 2 == 0:
        if s != "L" and s != "U" and s != "D":
            flag = 1
if flag == 0:
    print("Yes")
elif flag == 1:
    print("No")

Solution (Python):

def is_easy(steps):
    for i, step in enumerate(steps):
        if i % 2 == 0 and step == 'L':
            return 'No'
        elif i % 2 == 1 and step == 'R':
            return 'No'
    return 'Yes'
  
steps = input()
print(is_easy(steps))

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

Solution (Python):
import sys
S = input()
def tapdance() :
    i = 0
    L = len(S)
    for i in range(L):
        if i % 2 == 0:
            if S[i] == 'L' :
                print('No')
                return 
        else :
            if S[i] == 'R' :
                print('No')
                return 
    print('Yes')
    return
 
tapdance()

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

Solution (Python):


MOD = 10 ** 9 + 7

S = input()

ans = 0
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
    else:
        print('No')
        break
else:
    print('Yes')

Solution (Python):
dance = input()
judge = True

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

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

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

Solution (Python):
def dance(s):
    for i in range(0,len(s)):
        d = i%2
        if d == 0 and s[i] == "L":
            return "No"
        if d == 1 and s[i] == "R":
            return "No"
    return "Yes"

s = input()
print(dance(s))

Solution (Python):
s = input()

s1 =set(list(s[0:len(s):2]))
s2 =set(list(s[1:len(s):2]))
ki = set(['R','U','D'])
gu = set(['L','U','D'])


if ki.issuperset(s1) and gu.issuperset(s2):
  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()
i=0
for c in s:
    i+=1
    if i%2:
        if not(c=='R' or c=='U' or c=='D'):
            print("No")
            break
    else:
        if not(c=='L' or c=='U' or c=='D'):
            print("No")
            break
else: print("Yes")

Solution (Python):
s=input()
i=0
flag=1
for c in s:
    i+=1
    if i%2:
        if not(c=='R' or c=='U' or c=='D'):
            print("No")
            flag=0
            break
    else:
        if not(c=='L' or c=='U' or c=='D'):
            print("No")
            flag=0
            break
if flag: print("Yes")

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




for i in range(0,len(s)):
    l = s[i]
    a = 1
    if i%2 == 0 and l=='L':
            break

    elif i%2 ==1 and l=='R':
            break

    else:
        	a = 0

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

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

Solution (Python):
import sys

S = list(input())

odd = S[::2]
even = S[1::2]

flag = True

for i in odd:
      if i == 'L':
            flag = False
            break
for j in even:
      if j =='R':
            flag = False
            break

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

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

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

A, B = [D[i] for i in range(0, len(D), 2)], [D[i] for i in range(1, len(D), 2)]
iA,iB = list("RUD"),list("LUD")

for v in A:
    if v not in iA:
        print("No")
        exit(0)
for v in B:
    if v not in iB:
        print("No")
        exit(0)
print("Yes")

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

Solution (Python):
S=input()
num=1
ans="No"

while True:
  word=S[0]
  if num%2==1 :
    if  (word=="R") or (word=="U") or (word=="D") :
      if len(S)==1 :
        ans="Yes"
        break
      S=S[1:]
      num+=1
      continue
  else:
    if (word=="L") or (word=="U") or (word=="D") :
      if len(S)==1 :
        ans="Yes"
        break
      S=S[1:]
      num+=1
      continue
  break
      
print(ans)

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

Solution (Python):
s=input()
i=0
for tmp in list(s):
  i+=1
  if i%2==0:
    if tmp in ['L','U','D']:
      x='Y'  
      continue
    else:
      x='N'
      break
  else:
    if tmp in ['R','U','D']:
      x='Y'  
      continue
    else:
      x='N'
      break
  break
if x=='N':
    print('No')
else:
    print('Yes')

Solution (Python):


S = input()
odd = []
even = []
result = 'No'

S_list = list(S)

for i, s in enumerate(S_list):
    if (i + 1) % 2 == 0:
        even.append(s)
    else:
        odd.append(s)

if 'L' not in odd and 'R' not in even:
    result = 'Yes'

print(result)

Solution (Python):

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

Solution (Python):
s = str(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()
else:
  print('Yes')

Solution (Python):
s = str(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()
else:
  print('Yes')

Solution (Python):
import sys


def solve():
    step = input()
    
    for i in range(len(step)):
        if i % 2 == 0:
            if step[i] != 'R' and step[i] != 'U' and step[i] != 'D':
                print('No')
                sys.exit()
        else:
            if step[i] != 'L' and step[i] != 'U' and step[i] != 'D':
                print('No')
                sys.exit()
    
    print('Yes')


if __name__ == '__main__':
    solve()

Solution (Python):
import sys


def solve():
    step = input()
    flag = True
    
    for i in range(len(step)):
        if i % 2 == 0:
            if step[i] != 'R' and step[i] != 'U' and step[i] != 'D':
                print('No')
                sys.exit()
        else:
            if step[i] != 'L' and step[i] != 'U' and step[i] != 'D':
                print('No')
                sys.exit()
    
    print('Yes')


if __name__ == '__main__':
    solve()

Solution (Python):
a = list(input())
i = 0
while True:
    odd = a[i]
    if odd == 'L':
        print('No')
        break
    i += 1
    if i == len(a):
        print('Yes')
        break
    even = a[i]
    if even == 'R':
        print('No')
        break
    i += 1
    if i == len(a):
        print('Yes')
        break

Solution (Python):
S = input()

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

flag = True
for i, e in enumerate(S):
  if i % 2 == 0:
    if e not in odd:
      flag = False
  else:
    if e not in even:
      flag = False
      
if flag:
  print('Yes')
else:
  print('No')

Solution (Python):
a=input()
for i,k in enumerate(a):
  if i%2==0:
    if k=="L":
      print("No")
      exit()
  else:
    if k=="R":
      print("No")
      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()
print("Yes" if ("L" not in S[::2]) and ("R" not in S[1::2]) else "No")

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

Solution (Python):
s = input()

isOdd = True
for i in range(len(s)):
    if i % 2 == 1:
        if s[i] != 'L' and s[i] != 'U' and s[i] != 'D':
            isOdd = False

isEven = True
for i in range(len(s)):
    if i == 0 or i % 2 == 0:
        if s[i] != 'R' and s[i] != 'U' and s[i] != 'D':
            isEven = False

if isOdd == True and isEven == True:
    print("Yes")
else:
    print("No")

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

Solution (Python):

"""Untitled1.ipynb

Automatically generated by Colaboratory.

Original file is located at
    https://colab.research.google.com/drive/1sPHBzfvofvfL_Ijx8PVG08rBK-9-M_-6
"""

import sys

Weather = input()

def Odd(x) :
  if x == 'L' :
    return True

def Even(x) :
  if x == 'R' :
    return True

def Step(Weather) :
  k =1
  for x in Weather :
    if k%2 ==1:
      if Odd(x) :
        break
      k+=1
    else:
      if Even(x) :
        break
      k+=1
  if k >len(Weather) :
    return True
  else :
    return False

if Step(Weather):
  print('Yes')
else :
  print('No')

Solution (Python):
s = input()

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

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

Solution (Python):
S=input()

ans="Yes"

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

for i in range(len(S)):
    if i%2==0 and S[i] in odd:
        continue
    elif i%2!=0 and S[i] in even:
        continue
    else:
        ans="No"
        break

print(ans)

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

Solution (Python):
s = input()

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

Solution (Python):
S = input()

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

Solution (Python):
s = input()

flg = 0
for i, c in enumerate(s):
  if i%2!=0:
    if c in ["L", "U", "D"]:
      continue
    else:
      flg = 1
      break
  else:
    if c in ["R", "U", "D"]:
      continue
    else:
      flg = 1
      break

ans = "Yes" if not flg else "No"
print(ans)

Solution (Python):
S = input()

odd = S[::2]
even = S[1::2]

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

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

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

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

odd = 'RUD'
even= 'LUD'
frag = True

for i in range(len(S)):
    if i%2 == 0 and S[i] not in odd:
        frag =False
        break
    elif i%2 !=0 and S[i] not in even:
        frag = False
        
if frag :
    print('Yes')
else:
    print('No')

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

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

if 1 <= len(S) <= 100 and check==0:
    pass
else:
    print('EROOR')
    S = str(input())

RUD = 0
LUD = 0

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

if RUD == 0 and LUD == 0:
    print('Yes')
else:
    print('No')

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

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

print(ans)

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

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

Solution (Python):
S = input()

flag = False

for i in range(len(S)):
    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):
s = input()

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

print(ans)

Solution (Python):
s = input()

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

Solution (Python):
import sys

s = input()

rud1 = ["R","U","D"]
lud2 = ["L","U","D"]


for val in range(0,len(s),2):
    if s[val] not in rud1:
        print("No")
        sys.exit(0)

for val in range(1,len(s),2):
    if s[val] not in lud2:
        print("No")
        sys.exit(0)
print("Yes")

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

Solution (Python):
import sys
a=list(input())
i=0
while i<len(a):
    if(i%2==0):
        if a[i]=='L':
            print('No')
            sys.exit()
    else:
        if a[i]=='R':
            print('No')
            sys.exit()
    i+=1
print('Yes')

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
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 = input()
ans = 'Yes'
for i, str in enumerate(s):
    if i % 2 == 0:
        if str not in 'RUD':
            ans = 'No'
            break
    else:
        if str not in 'LUD':
            ans = 'No'
            break
print(ans)

Solution (Python):
c=input()
test='Yes'
for i in range (len(c)) :
    if( i % 2) ==0 :
        if not (c[i] in 'URD') :
            test = 'No'
            break
    else :
        if not (c[i] in 'ULD') :
            test = 'No'
            break
print( test)

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

if __name__ == "__main__":
    main()

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

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

Solution (Python):
S = input()
k = ''
g = ''
for i, s in enumerate(S):
    if i % 2 == 0:
        k += s
    else:
        g += s

if 'L' not in k and 'R' not in g:
    ans = 'Yes'
else:
    ans = 'No'

print(ans)

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



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

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

Solution (Python):

step_list = list(input())


isEasy = True


for index in range(len(step_list)):
    num = index + 1
    item = step_list[index]
    
    if (item == 'R'):
        if (num % 2 == 0):
            isEasy = False
    elif (item == 'L'):
        if (num % 2 == 1):
            isEasy = False
    
    if not isEasy:
        break

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

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

i = 0
while i < len(S):
    if i % 2 == 0 and S[i] in ["R", "U", "D"]:
        i += 1
        continue
    elif i % 2 == 1 and S[i] in ["L", "U", "D"]:
        i += 1
        continue
    else:
        print("No")
        exit()
print("Yes")

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

odd_set = set(["R", "U", "D"])
even_set = set(["L", "U", "D"])

flag = True
for i,s in enumerate(S):
  if((i+1)%2 == 1):
    if(s not in odd_set):
      flag = False
      break
  else:
    if(s not in even_set):
      flag = False
      break
if(flag):
  print("Yes")
else:
  print("No")

Solution (Python):
import re

s = input()

pattern = re.compile(r'^([^L][^R])*[^L]?$')
is_easy_to_dance = pattern.match(s)

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

Solution (Python):
ans = True
for i, c in enumerate(input()):
  if i%2:
    if c not in ['L', 'U', 'D']:
      ans = False
  else:
    if c not in ['R', 'U', 'D']:
      ans = False
print('Yes' if ans else 'No')

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    s = str(input().rstrip('\n'))
    for i in range(len(s)):
        if i % 2 == 0:
            if s[i] == "L":
                print("No")
                exit()
        else:
            if s[i] == "R":
                print("No")
                exit()
    print("Yes")


if __name__ == '__main__':
    slove()

Solution (Python):


odd_check = ('R', 'U', 'D')
even_check = ('L', 'U', 'D') 

s = input()
s = list(s)

roop_count = 1

for i in s:
    if roop_count % 2 != 0:
        if i in odd_check:
            roop_count += 1
            pass
        else:
            print('No')
            exit()
    
    else:
        if i in even_check:
            roop_count += 1
            pass
        else:
            print('No')
            exit()
            

print('Yes')

Solution (Python):
S = list(input())
cnt = 0
for i in S:
    if cnt == 0:
        if i == "L":
            print("No")
            exit()
    else:
        if i == "R":
            print("No")
            exit()
    cnt ^= 1
print("Yes")

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

Solution (Python):
dance=input()
char=list(dance)
swt=0

for i in range((len(dance)+1)//2):
    
    if (char[2*i] == "L"):
        swt += 1

for i in range(len(dance)//2):
    
    if(char[2*i+1] == "R"):
        swt += 1

if (swt==0):
    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') and (S[i] != 'U') and (S[i] != 'D'):
           print('No')
           sys.exit()
    if  (i % 2) == 0:
        if  (S[i] != 'R') and (S[i] != 'U') and (S[i] != 'D'):
           print('No')
           sys.exit()

print('Yes')

Solution (Python):
s=list(input())
if(all((x!='R' for x in s[1::2])) and all((x!='L' for x in s[::2]))):
    print("Yes")
else:
    print("No")

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

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

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

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

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

solve()

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

Solution (Python):
string = input()

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

odd_if = set(odd) <= {'R', 'U', 'D'}
even_if = set(even) <= {'L', 'U', 'D'}

if odd_if and even_if:
    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')
            exit()
    
    else:
        if not (S[i] == 'L' or S[i] == 'U' or S[i] == 'D'):
            print('No')
            exit()

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):
import sys
odd = 'RUD'
even = 'LUD'
step = input()
odd_step = step[0::2]
even_step = step[1::2]
for o in odd_step:
    if not o in odd:
        print('No')
        sys.exit(0)
for e in even_step:
    if not e in even:
        print('No')
        sys.exit(0)
print('Yes')

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

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

r = [i for i, x in enumerate(S) if (x == 'R' and (i+1) % 2 == 0) or (x == 'L' and (i+1) % 2 != 0)]

if len(r) == 0:
  print('Yes')
else:
  print('No')

Solution (Python):
import math
import queue

mod = 1e9+7

def swap(a,b):
    return (b,a)

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

def divisors(a):
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def main():
    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)
    return

if __name__ == '__main__':
    main()

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

Solution (Python):

import copy
import random
import bisect 
import fractions 
import math
import sys
import bisect

mod = 10**9+7
sys.setrecursionlimit(mod) 

def LI(): return list(map(int, sys.stdin.readline().split()))

S = str(input())
ans = True
for i,s in enumerate(S):
    if i % 2 == 0 and s == "L" or i % 2 == 1 and s == "R":
        ans = False

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

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=input()
flag=1
for i in s[0::2]:
    if not (i in "RUD"):
        flag=0
for i in s[1::2]:
    if not (i in "LUD"):
        flag=0
if flag:
    print("Yes")
else :
    print("No")

Solution (Python):
x = list(input())
i = 0
edetector = True
odetector = True
while i < len(x):
    if  i % 2 == 0:
        if not x[i] in ["R", "U", "D"]:
            edetector = False
    else:
        if not x[i] in ["L", "U", "D"]:
            odetector = False
    i += 1

if edetector and odetector:
    print("Yes")
else:
    print("No")

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

Solution (Python):
s = input()

result = True
for i in range(0, len(s), 2):
  if s[i] == 'L':
    result = False
    break
    
if result:
  for i in range(1, len(s), 2):
    if s[i] == 'R':
      result = False
      break

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

Solution (Python):
S = list(input())
count = 0
for i in S:

  if count == 0:
    if i == "L":
      print("No")
      exit()
    count += 1
  else:
    if i == "R":
      print("No")
      exit()
    count -= 1
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")
    exit()
  elif i%2==1 and S[i] not in ["L","U","D"]:
    print("No")
    exit()
print("Yes")

Solution (Python):
s = input()
result = "Yes"

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

print (result)

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

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

    
print("Yes")

Solution (Python):
from sys import exit

s = input()

for i, c in enumerate(s):
    if i % 2 == 0 and c not in 'RUD':
        print('No')
        exit(0)
    elif i % 2 == 1 and c not in 'LUD':
        print('No')
        exit(0)

print('Yes')

Solution (Python):
s=input()

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

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

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

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

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

if set(S[::2]) <= set(["R", "U", "D"]) and set(S[1::2]) <= set(["L", "U", "D"]) :
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

kisu = ["R", "U", "D"]
gusu = ["L", "U", "D"]

flag = True

for i in range(len(s)):
    if (((i + 1) % 2 == 0) and not s[i] in gusu) or (((i + 1) % 2 == 1) and not s[i] in kisu):
        flag = False
        break

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

Solution (Python):
s=input()

sl=list(s)

kisu=["R","U","D"]
gusu=["L","U","D"]
flag=True

for i in range(1,len(sl)+1):
  st=sl[i-1]
  if i % 2 ==0 :
    if not st in gusu :
      flag=False
      break
  else :
    if not st in kisu :
      flag=False
      break
if flag :
  print("Yes")
else :
  print("No")

Solution (Python):
def tap_dance(st):
  size = len(st)
  for i in range(size):
    if (i+1) % 2 == 0:
      if st[i] not in "LUD":
        return "No"
    else:
      if st[i] not in "RUD":
        return "No"
  return "Yes"
st = input()
print(tap_dance(st))

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

Solution (Python):
import sys
s=str(input())
for i in range(len(s)):
    if i%2==0:
        if s[i] not in 'RUD':
            print('No')
            break
    else:
        if s[i] not in 'LUD':
            print('No')
            break
else:
    print('Yes')

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

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

print("Yes")

Solution (Python):



def main():
    s = list(input())
    odd = s[::2]
    even = s[1::2]

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


if __name__ == '__main__':
    main()

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