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):
DANCE = ['L', 'R', 'U', 'D']
EVEN_GOOD = ['L', 'U', 'D']
ODD_GOOD = ['R', 'U', 'D']

even = list()
odd = list()

S = input()
S = list(S)

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

flag = True

for e in even:
    if e in EVEN_GOOD:
        pass
    else:
        flag = False

for o in odd:
    if o in ODD_GOOD:
        pass
    else:
        flag = False

if flag:
    print('Yes', end='')
else:
    print('No', end='')

Solution (Python):
s = input()

s_list = list(s)
ans = 'Yes'

for i in range(len(s_list)):
    if i % 2 != 0:
        if s_list[i] == 'R':
            ans = 'No'
            break
    else:
        if s_list[i] == 'L':
            ans = 'No'
            break
print(ans)

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

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

Solution (Python):
def main():
    mn = [['L', 'U', 'D'], ['R', 'U', 'D']]
    steps = input()
    for i in range(0, len(steps)):
        if steps[i] not in mn[(i + 1) % 2]:
            print('No')
            return
    print('Yes')
    return 0

if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
s=input()
ans="Yes"
for i in s[::2]:
  if i not in "RUD":
    ans="No"
for j in s[1::2]:
  if j not in "LUD":
    ans="No"
print(ans)

Solution (Python):
from sys import stdin


def main():
    S = stdin.readline().rstrip()
    odd = [x for i, x in enumerate(S) if (i + 1) % 2]
    even = [x for i, x in enumerate(S) if not (i + 1) % 2]
    if len([x for x in odd if x == 'L']) or len([x for x in even if x == 'R']):
        print('No')
    else:
        print('Yes')


if __name__ == "__main__":
    main()

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

Solution (Python):
"""
N = int(input())
A, B = map(int,input().split())
A = list(map(int,input().split())) 
A = [int(input()) for _ in range(N)] 
lst = [list(map(int,input().split())) for i in range(M)] 
"""

S = input()

for i in range(len(S)):
  if i % 2 == 0:
    if S[i] not in ['R', 'U', 'D']: 
      ans = 'No'
      break
  else:
    if S[i] not in ['L', 'U', 'D']: 
      ans = 'No'
      break
else:
  ans = 'Yes'
  
print(ans)

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

Solution (Python):
s = input()

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

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

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

Solution (Python):

import sys
from operator import itemgetter
from fractions import gcd
from math import ceil, floor, sqrt
from copy import deepcopy
from collections import Counter, deque
import heapq
from functools import reduce
sys.setrecursionlimit(200000)





input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def fi(): return float(input())
def mfi(): return map(float, input().rstrip().split())
def lmfi(): return list(map(float, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
def exit(*arg): print(*arg); sys.exit()



def main():
    S = li()
    a = ["L", "R"]
    for i in range(len(S)):
        if S[i] == a[i % 2]:
            exit('No')
    print('Yes')
    return


if __name__ == '__main__':
    if not __debug__:
        import doctest
        doctest.testmod()
    main()

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

ans=True
for i in range(l):
    if((i%2==0 and s[i]=="L") or (i%2==1 and s[i]=="R")):
        ans=False

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

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

Solution (Python):
s=input()

lists=list(s)
sum=len(lists)

count=0

for i in range(sum):
  if i%2==0:
    if lists[i]=='R' or lists[i]=='U' or lists[i]=='D':
      count+=1
  else:
    if lists[i]=='L' or lists[i]=='U' or lists[i]=='D':
      count+=1

if count==sum:
  print('Yes')
else:
  print('No')

Solution (Python):
pattern = list(input())
failure_counter = False

for x in range(len(pattern)):
  if (x + 1) % 2 == 0:
    
    if pattern[x] == "R":
      failure_counter = True
  else:
    
    if pattern[x] == "L":
      failure_counter = True
if failure_counter:
  print("No")
else:
  print("Yes")

Solution (Python):
S=input()
ans="Yes"
for n,s in enumerate(S):
  m=n+1
  if m%2:
    if s=="L":ans="No"
  elif s=="R":ans="No"
print(ans)

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

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

Solution (Python):
s = input()
ans = 'Yes'
i = 0
for c in s:
  i += 1
  if i%2 == 0 and c == 'R':
    ans = 'No'
  if i%2 == 1 and c == 'L':
    ans = 'No'
print(ans)

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

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

Solution (Python):
if __name__ == "__main__":
    S = input()

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

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

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

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

else:
	print("Yes")

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

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

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

print(ans)

Solution (Python):
s = input()

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

for i in odd:
    if i != "R" and i != "U" and i != "D":
        print("No")
        exit()
for i in even:
    if i != "L" and i != "U" and i != "D":
        print("No")
        exit()
print("Yes")

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

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

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

Solution (Python):
S=input()
def kigu(S):
    c=1
    for s in S:
        if c%2==1:
            if s == "L":
                return print("No")
        else:
            if s == "R":
                return print("No")
        c+=1
    return print("Yes")
kigu(S)

Solution (Python):
s = input()

flag = "Yes"
for i, step in enumerate(s):
    if i % 2 == 0:
        if step in "RUD":
            pass
        else:
            flag = "No"
            break
    else:
        if step in "LUD":
            pass
        else:
            flag = "No"

print(flag)

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

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

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

line = input().strip()

for i, c in enumerate(line):
    if (i+1) % 2 == 1:
        if c not in odds:
            print("No")
            exit(0)
    else:
        if c not in evens:
            print("No")
            exit(0)
else:
    print("Yes")
    exit(0)

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




import sys

S = list(input())



for i in range(len(S)) :
    if i % 2 == 1 :
        if S[i] in 'LUD' :
            pass
        else :
            print('No')
            sys.exit()
    elif i % 2 == 0 :
        if S[i] in 'RUD' :
            pass
        else :
            print('No')
            sys.exit()
print('Yes')

Solution (Python):



S=str(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()
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']

for i in range(len(s)):
    if i % 2 == 0:
        if s[i] in odd:
            continue
        else:
            print('No')
            exit()
    else:
        if s[i] in even:
            continue
        else:
            print('No')
            exit()
print('Yes')

Solution (Python):
import sys

S = input()

def flip(even):
    if even == True:
        return False
    else:
        return True

even = False

for s in S:
    if even == False:
        if s in ["R","U","D"]:
            pass
        else:
            print("No")
            sys.exit()
    if even == True:
        if s in ["L","U","D"]:
            pass
        else:
            print("No")
            sys.exit()
    even = flip(even)

print("Yes")

Solution (Python):
S = input()



if (S[0::2].find('L') > -1) :
    print("No")
elif (S[1::2].find('R') > -1) :
    print("No")
else :
    print("Yes")

Solution (Python):
import sys
from bisect import *
from collections import *
from copy import deepcopy
from heapq import *
from itertools import *
from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

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


if __name__ == '__main__':
    main()

Solution (Python):
S = input()
ans = 'Yes'
for i, s in enumerate(S):
  if i % 2 == 0:
    if not s in set(['R','D','U']):
      ans = 'No'
      break
  else:
    if not s in set(['L','D','U']):
      ans = 'No'
      break
print(ans)

Solution (Python):
s = input()

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

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

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

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

Solution (Python):




s = input()

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

Solution (Python):
S = input()

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

Solution (Python):




S = input().strip()

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

is_easy = True
if 'L' in odd:
    is_easy = False

if 'R' in even:
    is_easy = False

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

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

Solution (Python):
import sys
sys.setrecursionlimit(5 * 10**5)
input=sys.stdin.readline

S = input().rstrip()

for i, s in enumerate(S):
    if i % 2 == 0:
        if s == "L":
            print("No")
            break
    else:
        if s == "R":
            print("No")
            break
else:
    print("Yes")

Solution (Python):
S=input()

ans="Yes"
for i in range(0,len(S),2):
    if S[i] == "L":
        ans = "No"
if len(S)>1:
    for i in range(1,len(S),2):
        if S[i] == "R":
            ans = "No"

print(ans)

Solution (Python):
import sys
s=list(input())
o=s[::2]
e=s[1::2]

for i in range(len(o)):
  if o[i]=='L':
    print('No')
    sys.exit() 
for i in range(len(e)):
  if e[i]=='R':
    print('No')
    sys.exit()
print('Yes')

Solution (Python):
S = input()

flag = 'Yes'

for s in range(len(S)):
    if S[s] != "U" and S[s] != "D":
        if s%2 == 0 and S[s] != "R":
            flag = 'No'
            break
        elif s%2 == 1 and S[s] != "L":
            flag = 'No'
            break

print(flag)

Solution (Python):
a = input()

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

Solution (Python):
s = input()
ans = 'Yes'
for i in range(len(s)):

    if (i +1) % 2 == 0:
        if s[i] != 'L' and s[i] != 'U' and s[i] != 'D':
            ans = 'No'
            break
    else:
        if  s[i] != 'R' and s[i] != 'U' and s[i] != 'D':
            ans = 'No'
            break
print(ans)

Solution (Python):
s = input()

arr = list(s)

count = 0

for i in range(len(arr)):
    if i % 2 == 0:
        if arr[i] == "R" or arr[i] == "U" or arr[i] == "D":
            count +=1
    if i % 2 == 1:
        if arr[i] == "L" or arr[i] == "U" or arr[i] == "D":
            count +=1        

if count == len(arr):
    print("Yes")
else:
    print("No")

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

Solution (Python):
s = input()

temp = True
for i in range(1,len(s),2):
    if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
        continue
    else:
        temp = False
for i in range(0,len(s),2):
    if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
        continue
    else:
        temp = False
if temp:
    print('Yes')
else:
    print('No')

Solution (Python):
def main():
    s = input()

    for i, c in zip(range(1, len(s) + 1), s):
        if (i % 2 == 0 and c not in "LUD") or (i % 2 == 1 and c not in "RUD"):
            print("No")
            break
    else:
        print("Yes")


main()

Solution (Python):
s = input()

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

for i in range(0, len(s), 2):
    if s[i] in odd:
        continue
    else:
        flag = False

for i in range(1, len(s), 2):
    if s[i] in even:
        continue
    else:
        flag = False

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

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

Solution (Python):




s = input()
yflg = True


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

if yflg == True:
    ans = "Yes"
else:
    ans = "No"


print(ans)

Solution (Python):
s=input()
judge=False

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

Solution (Python):
S = input()

flag = 0
for i, s in enumerate(S):
    if i % 2 == 1:
        if s == 'L' or s== 'U' or s=='D':
            continue
        else:
            flag = 1
            break
    else:
        if s == 'R' or s== 'U' or s=='D':
            continue
        else:
            flag = 1
            break

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

Solution (Python):
s = input()
even = False
flag = True
not_ok = {True: "R", False: "L"}
for char in s:
    if not_ok[even] == char:
        flag = False
        break
    even = not even
if flag:
    print("Yes")
else:
    print("No")

Solution (Python):
n= input()
f = True
for i,c in enumerate(n):
    if i%2==0: 
        if c == 'L':
            f = False
    else:
        if c == 'R':
            f = False

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

Solution (Python):
S = input()

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

Solution (Python):
t= input()
t1 = []
t2 = []
for i in range(len(t)):
  if (i+0)%2 == 0:
    t1.append(t[i])
  else:
    t2.append(t[i])
flag = 0
if "L" in t1:
  print("No")
  exit()
elif "R" in t2:
  print("No")
else:
  print("Yes")

Solution (Python):
S = input()

odd = S[0::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()
for i, v in enumerate(S):
  if i % 2 == 0:
    if v not in ['R', 'U', 'D']:
      print('No')
      exit()
  else:
    if v not in ['L', 'U', 'D']:
      print('No')
      exit()
print('Yes')

Solution (Python):
S = input()

total = 0
max = len(S)

for i, s in enumerate(S):
  if i % 2 == 0:
    if s =="R" or s =="U" or s == "D":
      total +=1
  elif i % 2 ==1:
    if s =="L" or s =="U" or s == "D":
      
      total +=1
      
if total == max:
  print("Yes")
else:
  print("No")

Solution (Python):
s=input()
odd=s[::2]
even=s[1::2]

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

Solution (Python):
s = input()

n = len(s)

ans = True
if n % 2 == 0:
    for i in range(n//2):
        if s[2*i] == 'L':
            ans = False
            break
        if s[2*i+1] == 'R':
            ans = False
            break
else:
    for i in range(n//2):
        if s[2*i] == 'L':
            ans = False
            break
        if s[2*i+1] == 'R':
            ans = False
            break
    else:
        if s[-1] == 'L':
            ans = False

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

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

a = "Yes"
for i,s in enumerate(S):
    if i % 2 == 0:
        if s in ["R", "U", "D"]:
            pass
        else:
            a = "No"
            break
    else:
        if s in ["L", "U", "D"]:
            pass
        else:
            a = "No"
            break
            
print(a)

Solution (Python):
import sys


def main():
    S = sys.stdin.readline().strip()
    is_easy = True
    for i in range(len(S)):
        c = S[i]
        if i % 2 == 0 and c == 'L':
            is_easy = False
        if i % 2 and c == 'R':
            is_easy = False
    if is_easy:
        print('Yes')
    else:
        print('No')


main()

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

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

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

Solution (Python):

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

if sum >= 1:
  print("No")
else:
  print("Yes")

Solution (Python):

a = input()

ans = 'Yes'

for i in range(len(a)):
    if i % 2 == 1:
        if a[i] == 'R':
            ans = 'No'
            break
    else:
        if a[i] == 'L':
            ans = 'No'
            break
print(ans)

Solution (Python):
S = input()

flag = 0

kisu = ['R', 'U', 'D']
gusu = ['L', 'U', 'D']
for c in S[0::2]:
    if not c in kisu:
        flag = 1
for c in S[1::2]:
    if not c in gusu:
        flag = 1

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

Solution (Python):
S = input()
for i, s in enumerate(S):
    if i % 2 == 0:
        if s not in ("R", "U", "D"):
            print("No")
            import sys
            sys.exit(0)
    else:
        if s not in ("L", "U", "D"):
            print("No")
            import sys
            sys.exit(0)
print("Yes")

Solution (Python):
S = input()
ok = True
for i, s in enumerate(S):
    index = i+1
    if index % 2 == 0 and s == "R":
        ok = False
        break
    if index % 2 == 1 and s == "L":
        ok = False
        break

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

Solution (Python):
s = input()

if len(s) == 1:
    if "L" != s:
        ans = "Yes"
    else:
        ans = "No"
else:
    if ("L" not in s[::2]) and ("R" not in s[1::2]):
        ans = "Yes"
    else:
        ans = "No"

print(ans)

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

for i in range(len(s)):
    if i % 2 != 0:
        if s[i] == 'R':
            ans = "No"
            break
    else:
        if s[i] == 'L':
            ans = "No"
            break
print(ans)

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

S = input()
ret = True
for i,s in enumerate(S):
    i = i+1
    if s not in step[i%2]:
        ret = False

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

Solution (Python):
S = input()

for i, s in enumerate(S):
    if i % 2 == 1 and s != "R":
        pass
    elif i % 2 == 0 and s != "L":
        pass
    else:
        print("No")
        exit()

print("Yes")

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

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

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

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

Solution (Python):
import sys
import bisect
MAX_INT = int(10e12)
MIN_NUM = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

s = S()
N = len(s)
ans = ["Yes","No"]
f = 0
for i in range(N):
  if i%2 == 0:
    if s[i] == "R" or s[i] == "U" or s[i] == "D":
      continue
    else:
      f = 1
  else:
    if s[i] == "L" or s[i] == "U" or s[i] == "D":
      continue
    else:
      f = 1

print(ans[f])

Solution (Python):
S = input()

list1 = list(S)

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

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

Solution (Python):
s=input()

odd = s[0:len(s):2]
even = s[1:len(s):2]

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

Solution (Python):

s = list(input())

odd = True
easy = True

for ch in s:
    if odd:
        if ch == 'L':
            easy = False
            break
        odd = False
    else:
        if ch == 'R':
            easy = False
            break
        odd = True

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

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

Solution (Python):
s = input()
n = 1
a = True
for c in s:
    if n % 2 == 0:
        if c == "L" or c == "U" or c == "D":
            n += 1
            continue
        else:
            a = False
            break
    else:
        if c == "R" or c == "U" or c == "D":
            n += 1
            continue
        else:
            a = False
            break
if a:
    print("Yes")
else:
    print("No")

Solution (Python):
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")


def main():
    S = input()
    logging.info("Hello!")

    i = 1
    for c in S:
        if i % 2 == 1:
            if c == "L":
                print("No")
                exit()

        if i % 2 == 0:
            if c == "R":
                print("No")
                exit()
        i += 1
            
    print("Yes")
    
if __name__ == "__main__":
    main()

Solution (Python):
S = input()

kisu = True
gusu = True
count = 1

for s in S:
  if count % 2 == 1:
    if s == 'L':
      kisu = False
  else:
    if s == 'R':
      gusu = False
  
  count += 1

print('Yes' if kisu and gusu else 'No')

Solution (Python):



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

Solution (Python):
S = input()

flg = False
for i in range(len(S)):
  if i % 2 == 0:
    if S[i] not in ['R', 'U', 'D']:
      flg = True
      break
  else:
    if S[i] not in ['L', 'U', 'D']:
      flg = True
      break

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

Solution (Python):
s = input().rstrip();
ans = 1;
for i in range(len(s)) :
	if i % 2 == 0 and s[i] == 'L' :
		ans = 0;
	if i % 2 == 1 and s[i] == 'R' :
		ans = 0;

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

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]

S = input()
r = False
l = False
f = False
L = len(S)
for i in range(L):
    s = S[i]
    if s=='R':
        if (i+1)%2==0:
            f = True
            break
        r = True
    elif s=='L':
        if (i+1)%2==1:
            f = True
            break
        l = True
if f:
    print('No')
else:
    print('Yes')

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

cnt = True

for i, si in enumerate(S):
    if i%2==0:
        if si=='L':
            cnt=False
            break
    else:
        if si=='R':
            cnt=False
            break
if cnt:print('Yes')
else:print('No')

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

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

easy = True
for i, c in enumerate(s, 1):
    if i % 2 == 1 and c == 'L':
        easy = False
        break
    elif i % 2 == 0 and c == 'R':
        easy = False
        break

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

Solution (Python):
s=list(input())
ans="Yes"
i=0
while i!=len(s):
    if (i+1)%2==1:
        if s[i]=="L":
            ans="No"
    else:
        if s[i]=="R":
            ans="No"
    i+=1
print(ans)

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

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

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

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