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

import io


data = input()

nim = len(data)

l = 0

for i in range(nim):
    if i%2==0:
        if data[i]=="L":
            l=1
    else:
        if data[i]=="R":
            l=1

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

Solution (Python):
S=input()
is_true=True
for i in range(0,len(S),2):
    
    if S[i]!="R" and S[i]!="U" and S[i]!="D":
        is_true=False
        break
for i in range(1,len(S),2):
    
    if S[i]!="L" and S[i]!="U" and S[i]!="D":
        is_true=False
        break
print("Yes" if is_true==True else "No")

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

Solution (Python):
s = input()
o = [s[2 * i] for i in range((len(s) + 1)// 2)]
e = [s[2 * i + 1] for i in range(len(s) // 2)]
if "L" not in o and "R" not in e:
    print("Yes")
else:
    print("No")

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

Solution (Python):





    


S = list(input())
 
is_difficult = 'Yes'

for i, s in enumerate(S):
    if (i+1)%2 == 0:
        if (s=='R'):
            is_difficult = 'No'
            break
    else:
        if (s=='L'):
            is_difficult = 'No'
            break
print(is_difficult)

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

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

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

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

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

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

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

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

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

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

Solution (Python):
s = input()

e1 = ['R', 'U', 'D']
e2 = ['L', 'U', 'D']

ans = 'Yes'

for i, c in enumerate(s):
    if ((i+1) % 2 == 0 and c in e2) or ((i+1) % 2 == 1 and c in e1):
        pass
    else:
        ans = 'No'
        break

print(ans)

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

odd = 'RUD'
even = 'LUD'

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

Solution (Python):
ls = list(map(str,input()))
lsa = ls[0::2]
lsb = ls[1::2]
flag = 0
for i in range(len(lsa)):
  if lsa[i] == 'L':
    flag += 1
for i in range(len(lsb)):
  if lsb[i] == 'R':
    flag += 1
if flag != 0:
  print('No')
else:
  print('Yes')

Solution (Python):
S=input()

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

Solution (Python):
S=str(input())
i = 0
yasui = True
for s in S:
  if i%2==0 and s=='L':
    yasui = False
  if i%2!=0 and s=='R':
    yasui = False
  i=i+1
if yasui:
  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()
s_odd=s[::2]
s_even=s[1::2]
print("Yes" if s_odd.count("L")==s_even.count("R")==0 else "No")

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

for a in odd:
   if a == "L":
      print("No")
      exit()

for b in even:
   if b == "R":
      print("No")
      exit()

print("Yes")

Solution (Python):
import sys


def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())

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

def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'


p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))


s=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 'R' in S[1::2] or 'L' in S[0::2]:
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()

i = 1
cnt = 0
for s in S:
    if i % 2 != 0:
        if s == 'R' or s == 'U' or s == 'D':
            cnt += 1
            i +=1
        else:
            i +=1
            continue
    elif i % 2 == 0:
        if s == 'L' or s == 'U' or s == 'D':
            cnt += 1
            i+=1
        else:
            i+=1
            continue
if cnt == len(S):
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
import sys
import os

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    S = list(iss())
    odd = 'RUD'
    even = 'LUD'
    ret = 'Yes'
    for n in range(len(S)):
        if (n + 1) % 2 == 0 and S[n] not in even or (n + 1) % 2 != 0 and S[n] not in odd:
            ret = 'No'
    else:
        print(ret)


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby
    
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

    s = input().rstrip()
    a = ['R', 'U', 'D']
    b = ['L', 'U', 'D']
    for i in range(len(s)):
        if i%2 == 0:
            if not s[i] in a:
                print('No')
                exit()
        else:
            if not s[i] in b:
                print('No')
                exit()
    print('Yes')

if __name__ == '__main__':
    main()

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")
        break
else:
    print("Yes")

Solution (Python):
s = input()
l = len(s)
count1 = 0
count2 = 0
for i in range(l//2 + l%2):
    if s[2*i] == "R" or s[2*i] == "U" or s[2*i] == "D":
        count1 += 1
for j in range(l//2):
    if s[2*j + 1] == "L" or s[2*j + 1] == "U" or s[2*j + 1] == "D":
        count2 += 1
if count1 == l//2 + l%2 and count2 == l//2:
    print("Yes")
else:
    print("No")

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

Solution (Python):

def ifif(s):
  if s:print("Yes")
  else:print("No")
u=1
s=input()
for k in range(len(s)):
  if s[k]=="L" and k%2==0:
    u=0
  elif s[k]=="R" and k%2==1:
    u=0

ifif(u)

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

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

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

Solution (Python):
s=input()
kisuu=list("RUD")
guusuu=list("LUD")
ans=0
for i in s[::2]:
    if i not in kisuu:
        ans+=1
for i in s[1::2]:
    if i not in guusuu:
        ans+=1
if ans==0:
    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
            break
    else:
        if S[i] == 'R':
            flag = False
            break
print("Yes" if flag == True else 'No')

Solution (Python):
list = list(input())
a = ['L', 'U', 'D']
b = ['R', 'U', 'D']
isOK = True

for i, name in enumerate(list):
  if i % 2 == 1 and name not in a:
    isOK = False
  elif i % 2 == 0 and name not in b:
    isOK = False
  
print('Yes' if isOK else 'No')

Solution (Python):
import sys
S = input()
L = len(S)
i = 0
while i < L:
  if S[i] not in ['R','U','D']:
    print('No')
    sys.exit(0)
  i+=2
i = 1
while i < L:
  if S[i] not in ['L','U','D']:
    print('No')
    sys.exit(0)
  i += 2
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()
f=0
for i in range(len(S)):
    if i%2==0 and S[i]=="L":
        print("No")
        f+=1
        break
    if i%2==1 and S[i]=="R":
        print("No")
        f+=1
        break
if f==0:
    print("Yes")

Solution (Python):
def q2():
    S = list(input())
    ans = 'Yes'
    for i in range(len(S)):
        if i % 2 == 0 and S[i] not in ['R', 'U', 'D']:
            ans = 'No'
        elif i % 2 == 1 and S[i] not in ['L', 'U', 'D']:
            ans = 'No'

    print(ans)


if __name__ == '__main__':
    q2()

Solution (Python):
S = input()


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

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

Solution (Python):
s = input()

flag = 1

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

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

Solution (Python):
s = input()
ok = True
for i in range(len(s)):
  if i%2 == 0 and s[i] not in 'RUD':
    ok = False
  elif i%2 == 1 and s[i] not in 'LUD':
    ok = False
print('Yes' if ok else 'No')

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

Solution (Python):
s = list(input())
sum = 0
for i in range(len(s)):
    if i % 2 != 0:
        if "R" == s[i]:
            sum += 1

    elif i % 2 == 0:
        if "L" == s[i]:
            sum += 1

if sum > 0:
    print("No")
else:
    print("Yes")

Solution (Python):
S = input()

n = len(S)

good = True

for i in range(n):
    if i % 2 == 0:
        if S[i] == 'L':
            good = False
            break
    else:
        if S[i] == 'R':
            good = False
            break

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

Solution (Python):
S = input()
result = 'Yes'

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

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

Solution (Python):
S = input()

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

for i in range(len(S)):
    if (i+1) % 2 == 0:
        if not S[i] in even:
            print('No')
            exit()
    else:
        if not S[i] in odd:
            print('No')
            exit()

print('Yes')

Solution (Python):
S = input()
count = 0
for i, s in enumerate(S, 1):
  if i % 2 != 0:
    count += s != 'L'
  else:
    count += s != 'R'

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

Solution (Python):
s = input()
ans = 'Yes'
for i,j in enumerate(s):
  if i&1 and j == 'R':
    ans = 'No'
  elif 1 - i&1 and j == 'L':
    ans = 'No'
print(ans)

Solution (Python):
s = list(input())
n = len(s)
k = ['R','U','D']
g = ['L','U','D']
count =0

for i in range(n):
    if i % 2 ==0:
        if s[i] in k:
            count +=1
    else:
        if s[i] in g:
            count += 1
       
if count == n:
    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
    else:
        if s[i] == 'R':
            ok = False
if ok:
    print('Yes')
else:
    print('No')

Solution (Python):

s = input()

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

flg = False

for i in range(len(s)):
    if i % 2 == 0:
        if s[i] in kisu:
            flg = True
        else:
            flg = False
            break
    else:
        if s[i] in gusu:
            flg = True
        else:
            flg = False
            break
                
if flg:
    print('Yes')
    
else:
    print('No')

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

Solution (Python):
S = input()

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

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

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

Solution (Python):
S = input()

answer = 'Yes'
for i, s in enumerate(S):
    nth = i + 1
    is_odd = nth % 2 == 1
    is_even = not is_odd
    if (
        (is_odd and s in 'RUD') or
        (is_even and s in 'LUD')
    ): continue
    answer = 'No'

print(answer)

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

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

Solution (Python):
s = input()
odd = ["R", "U", "D"]
even = ["L", "U", "D"]
for i in list(s[::2]):
    if i not in odd: 
        print("No")
        exit()
for i in list(s[1::2]):
    if i not in even: 
        print("No")
        exit()
print("Yes")

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

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

S=list(ns())
S_o=''.join(S[0::2])
S_e=''.join(S[1::2])
print('Yes' if ((not ('L' in S_o)) and (not ('R' in S_e))) else 'No')

Solution (Python):
s = input()

flg = True
for i in range(len(s)):
    if s[i] == 'U':
        
        continue
    elif s[i] == 'D':
        
        continue
    elif i % 2 == 0 and s[i] == 'R':
        
        continue
    elif i % 2 == 1 and s[i] == 'L':
        
        continue
    else:
        
        flg = False
        break

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

Solution (Python):
import math
a = input()
a_half = math.floor(len(a)/2)
count= 0
ans_list_R = ['R', 'U','D']
ans_list_L = ['L', 'U','D']
for i in range(len(a)):
    if i % 2==0:
        if a[i] in ans_list_R:
            count += 1
    else:
        if a[i] in ans_list_L:
            count += 1
if count == len(a) :
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
input = sys.stdin.readline
from itertools import *
from collections import *

INF = float('inf')


def main():
    S = input().rstrip()
    str_odd = S[::2]
    str_even = S[1::2]

    if 'L' in str_odd or 'R' in str_even:
        print('No')
    else:
        print('Yes')


if __name__ == '__main__':
    main()

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

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

Solution (Python):










"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
  
def main():
  s = input()
  ODD = ['R','U','D']
  EVEN = ['L','U','D']
  slen = len(s)
  
  for i in range(slen):
    if (i+1) % 2 == 0:
      
      if s[i] in EVEN:
        pass
      else:
        print('No')
        exit()
    else:
      
      if s[i] in ODD:
        pass
      else:
        print('No')
        exit()
  print('Yes')
  
if __name__ == '__main__':
  main()

Solution (Python):
S=input();A='Yes';i=0
while i<len(S):
    if S[i]==['L','R'][i%2]:A='No'
    i+=1
print(A)

Solution (Python):
s = input()
a = set(i for j, i in enumerate(s) if j%2==0)
b = set(i for j, i in enumerate(s) if j%2==1)
if (a & {'L'}) or (b & {'R'}):
    print('No')
else:
    print('Yes')

Solution (Python):
s = input()
odd = ["R","U","D"]
even = ["L","U","D"]
ret = "Yes"
for i,v in enumerate(s):
    l = even
    if i % 2==0:
        l = odd
    if v not in l:
        ret  ="No"
        break
print(ret)

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=input()
arr1=["R","U","D"]
arr2=["L","U","D"]
for i in range(len(s)):
  if (i%2==0 and not (s[i] in arr1)) or (i%2==1 and not (s[i] in arr2)):
    print("No")
    exit()
print("Yes")

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

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

Solution (Python):
S=list(input())
flag=True
for i in range(1,len(S)+1):
    if i%2==1 and S[i-1]=="L":
        flag=False
        break
    elif i%2==0 and S[i-1]=="R":
        flag=False
        break
print("Yes" if flag else "No")

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

Solution (Python):
S = input()
dancable = True
for i in range(len(S)):
  if i % 2 == 1:
    dancable &= (S[i] == 'L') or (S[i] == 'U') or (S[i] == 'D')
  else:
    dancable &= (S[i] == 'R') or (S[i] == 'U') or (S[i] == 'D')
print('Yes' if dancable else 'No')

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

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

Solution (Python):
S = str(input())
odd = ''
even = ''
for s in range(0,len(S),2):
  odd += S[s]
for s in range(1,len(S),2):
  even += S[s]

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

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

Solution (Python):
sk = ['R','U','D'];sg = ['L','U','D']
S = list(input())
flg = 'Yes'
for i in range(len(S)):
  if i%2 == 0:
    if sk.count(S[i]) == 0:
      flg = 'No'
      break
  else:
    if sg.count(S[i]) == 0:
      flg = 'No'
      break
print(flg)

Solution (Python):
S = list(input())
ans = 'Yes'
for i in range(0, len(S), 2):
    if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
        pass
    else:
        ans = 'No'
for i in range(1, len(S), 2):
    if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
        pass
    else:
        ans = 'No'

print(ans)

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

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

check = 0
for i, s in enumerate(S):
    if i % 2 == 0 and s == 'L':
        check = 1
    if i % 2 == 1 and s == 'R':
        check = 1

if check == 0:
    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()
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
import math
import collections
from collections import deque


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

def ki():
    for i in range(0,len(s),2):
        if s[i] != "R" and s[i] != "U" and s[i] != "D":
            return False
    return True

def gu():
    for i in range(1,len(s),2):
        if s[i] != "L" and s[i] != "U" and s[i] != "D":
            return False
    return True

if ki():
    if gu():
        print("Yes")
    else:
        print("No")
else:
    print("No")

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

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

print(ans)

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

Solution (Python):
s = input()

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

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

Solution (Python):
import numpy as np
from sys import stdin

def main():
  s = input()
  n = len(s)
  
  ok = True
  for i in range(n):
    if (i%2 == 1 and s[i] == "R"):
      ok = False
    if (i%2 == 0 and s[i] == "L"):
      ok = False
  
  if (ok):
    str_ = "Yes"
  else:
    str_ ="No"
    
  print(str_)
  
if __name__ == "__main__":
    main()

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

Solution (Python):
s = [(i%2==0 and chr=='L' or i%2==1 and chr=='R') for chr, i in zip(input(), range(101))]
print('Yes' if not any(s) else 'No')

Solution (Python):
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

S = sr()
bl = True
if 'L' in S[0::2] or 'R' in S[1::2]:
    bl = False
print('Yes' if bl else 'No')

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()
o = ["R", "U", "D"]
e = ["L", "U", "D"]
for i, si in enumerate(s):
    if i % 2 == 0:
        if si not in o:
            print("No")
            exit()
    else:
        if si not in e:
            print("No")
            exit()
print("Yes")

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

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

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':
        pass
    elif i%2==1 and S[i]=='L' or S[i]=='U' or S[i]=='D':
        pass
    else:
        print('No')
        break
else:
    print('Yes')

Solution (Python):

S= input()
count = 0
if len(S)%2 ==0:
    for i in range(len(S)//2):
        if S[i*2]=='L':
            count +=1
    for m in range(len(S)//2):
        if S[m*2+1]=='R':
            count +=1
elif len(S)%2 ==1:
    for i in range(len(S)//2):
        if S[i*2]=='L':
            count +=1
    for m in range(len(S)//2):
        if S[m*2+1]=='R':
            count+=1
    if S[-1]=='L':
        count+=1
if count ==0:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()
ki = {'R', 'U', 'D'}
gu = {'L', 'U', 'D'}
flg = True
for i in s[0::2]:
  if i in ki:
    continue
  else:
    flg = False
for i in s[1::2]:
  if i in gu:
    continue
  else:
    flg = False
print('Yes' if flg else 'No')

Solution (Python):
import math
S = input()
n = len(S)

for i in range(math.ceil(n/2)):
    if S[2*i] != "R" and S[2*i] != "U" and S[2*i] != "D":
        print("No")
        exit()
for i in range(int(n/2)):
    if S[2*i + 1] != "L" and S[2*i + 1] != "U" and S[2*i + 1] != "D":
        print("No")
        exit()
print("Yes")

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

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

for i in range(0 - -l//2):
    if s[i*2] == "L":
        print("No")
        exit()
for i in range(l//2):
    if s[i*2 + 1] == "R":
        print("No")
        exit()

print("Yes")

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

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

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

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

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

Solution (Python):
s = input()

for i, s_i in enumerate(s):
    index = i + 1
    if index % 2 == 0:
        if s_i in 'LUD':
            continue
        else:
            print('No')
            break
    else:
        if s_i in 'RUD':
            continue
        else:
            print('No')
            break
else:
    print('Yes')

Solution (Python):

"""
B - Tap Dance
https://atcoder.jp/contests/abc141/tasks/abc141_b

"""
import sys


def solve(S):
    odds = S[::2]
    evens = S[1::2]
    if all(o in 'RUD' for o in odds) and all(e in 'LUD' for e in evens):
        return 'Yes'
    return 'No'


def main(args):
    S = input()
    ans = solve(S)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    S = list(input())
    even = set(S[1::2])
    odd = set(S[0::2])
    o = {'R', 'U', 'D'}
    e = {'L', 'U', 'D'}
    res = 'Yes'
    if not(even <= e) or not(odd <= o):
        res = 'No'
    print(res)

if __name__ == '__main__':
    main()