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):
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import time
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
ts=time.time()
sys.setrecursionlimit(10**6)

show_flg=False
show_flg=True
ans=math.log(3,3)
an=0
k=0
s=list(input())
n=len(s)
d=[['R','U','D'],['L','U','D']]
for i in range(n):
    if s[i] in d[k]:
        0
    else:
        an=1
    k=1-k
    
print(YN[an])

Solution (Python):
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import time
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
ts=time.time()
sys.setrecursionlimit(10**6)

show_flg=False
show_flg=True

an=0
k=0
s=list(input())
n=len(s)
d=[['R','U','D'],['L','U','D']]
for i in range(n):
    if s[i] in d[k]:
        0
    else:
        an=1
    k=1-k
    
print(YN[an])

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

Solution (Python):
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import time
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
ts=time.time()
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()
show_flg=False
show_flg=True

an=0
k=0
s=list(input())
n=len(s)
d=[['R','U','D'],['L','U','D']]
for i in range(n):
    if s[i] in d[k]:
        0
    else:
        an=1
    k=1-k
    
print(YN[an])

Solution (Python):
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import time
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
ts=time.time()
sys.setrecursionlimit(10**6)

show_flg=False
show_flg=True

an=0
k=0
s=list(input())
n=len(s)
d=[['R','U','D'],['L','U','D']]
for i in range(n):
    if s[i] in d[k]:
        0
    else:
        an=1
    k=1-k
    
print(YN[an])

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

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

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

Solution (Python):
S = input()

cnt = 0
ans = 'Yes'

for s in S:
	if cnt%2 == 0:
		if s != 'R' and s != 'U' and s != 'D':
			ans = 'No'
	else:
		if s != 'L' and s != 'U' and s != 'D':
			ans = 'No'
	cnt+=1

print(ans)

Solution (Python):
stepableodd = True
stepableeven = True
step = input()
for i in range(1,len(step)+1):
    if i % 2 == 1:
        if step[i-1] == "R" or step[i-1] == "D" or step[i-1] == "U":
            if stepableodd == False:
                stepableodd = False
        else:
            stepableodd = False
    elif i % 2 == 0:
        if step[i-1] == "L" or step[i-1] == "D" or step[i-1] == "U":
            if stepableeven == False:
                stepableeven = False
        else:
            stepableeven = False
if stepableodd == True and stepableeven == True:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
S = input()

ans = 'Yes'

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

print(ans)

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

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

Solution (Python):
S=input()

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

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

Solution (Python):
s=input()
s2=s[0: :2]
s1=s[1: :2]
ans=0

for i in range(len(s1)):
    if s1[i]=='L' or s1[i]=='U' or s1[i]=='D':
        ans+=1
    else:
        print('No')
        break

if ans==len(s1):   
    for i in range(len(s2)):
        if s2[i]=='R' or s2[i]=='U' or s2[i]=='D':
            ans+=1
        else:
            print('No')
            break
        
if ans==len(s):
    print('Yes')

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

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

count=1
for k in S:
    if count%2 != 0:
        if k != "R" and k != "U" and k != "D":
            break
    elif count%2 == 0:
        if k != "L" and k != "U" and k != "D":
            break
    count += 1

if count-1 == len(S):
    print("Yes")
else:
    print("No")

Solution (Python):
S = list(input())
count = 0
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
  count += 1
if count == len(S):
  print("Yes")

Solution (Python):
s = input()

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

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

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

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

Solution (Python):
S = raw_input()
ans = "Yes"

for i in range(1,len(S)+1):
  if i % 2 == 1 and S[i-1] == "L":
    ans = "No"
    break
  elif i % 2 == 0 and S[i-1] == "R":
    ans = "No"
    break
print ans

Solution (Python):
import sys


S=input()

if S.count("U")+S.count("D")+S[0::2].count("R")+S[1::2].count("L")==len(S):
    print("Yes")
else:
    print("No")

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

for i,str in enumerate(S):
    if i%2==0:
        if str=='L':
            flag = 'No'
    else:
        if str=='R':
            flag = 'No'


print(flag)

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

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

Solution (Python):
S = input()
oddSet = set(['R', 'U', 'D'])
evenSet = set(['L', 'U', 'D'])
for idx, ch in enumerate(S):
	if(idx % 2 == 0):
		if(ch not in oddSet):
			print("No")
			exit(0)
	else:
		if(ch not in evenSet):
			print("No")
			exit(0)
print("Yes")

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

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

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

Solution (Python):


S=input()

while True:
    if S=="":
        print("Yes")
        break
    elif S[0]=="L":
        print("No")
        break
    
    if S[1:]=="":
        print("Yes")
        break
    elif S[1]=="R":
        print("No")
        break
        
    S=S[2:]

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

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

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

Solution (Python):
S = 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=list(input())
odd = list(s[::2])
even = list(s[1::2])
print('Yes' if 'L' not in set(odd) and 'R' not in set(even) else 'No')

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

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

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

Solution (Python):

s = input()
sr = s[::2].replace("R", "").replace("U", "").replace("D", "")
sl = s[1::2].replace("L", "").replace("U", "").replace("D", "")
if sr or sl:
    print("No")
    exit()
print("Yes")

Solution (Python):
s = input()
ans = "Yes"
for i, char in enumerate(s):
    if i % 2 == 1:
        if char == "R":
            ans = "No"
    else:
        if char == "L":
            ans = "No"

print(ans)

Solution (Python):
S = input()
lis = list(S)
count = 0

for i in range(len(lis)):
    if i % 2 == 0:
        if lis[i] == 'R':
            count += 1
    if i % 2 != 0:
        if lis[i] == 'L':
            count += 1

    if lis[i] == 'U' or lis[i] == 'D':
        count += 1

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

Solution (Python):
import sys

input_str = input()

ODD_STR = ['R','U','D']
EVEN_STR = ['L','U','D']
for index, st in enumerate(input_str):
    index += 1
    if index %2 == 0 and st in EVEN_STR:
        continue
    elif index%2 == 1 and st in ODD_STR:
        continue
    print('No')
    sys.exit()

print('Yes')

Solution (Python):
s = input()
n = len(s)
i = 1
while i <= n:
  if i % 2 == 0:
    if s[i-1] == "R":
      print("No")
      exit()
  else:
    if s[i-1] == "L":
      print("No")
      exit()
  i += 1
print("Yes")

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

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

Solution (Python):
S = input()
ans = 'Yes'
for i, si in enumerate(S):
    if i % 2 == 0:
        if si == 'L':
            ans = 'No'
    else:
        if si == 'R':
            ans = 'No'


print(ans)

Solution (Python):
S = input()
ans = 'Yes'
for i, si in enumerate(S):
    if (i + 1) % 2 == 1:
        if si not in ['R', 'U', 'D']:
            ans = 'No'
    else:
        if si not in ['L', 'U', 'D']:
            ans = 'No'

print(ans)

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()
J=True
for i in range(len(S)):
    if i%2!=0:
        if S[i]=='R':
            J=False
    else:
        if S[i]=='L':
            J=False
if J==True:
    print('Yes')
else:
    print('No')

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

for i in range(len(s)):
  if(s[i] in ["U", "D"] or (i % 2 == 0 and s[i] == "R") or (i % 2 == 1 and s[i] == "L")):
    continue
  else:
    result = "No"
    break
    
print(result)

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

Solution (Python):
S = input()
N = len(S)
even_set = {S[i] for i in range(N) if i % 2 == 1}
odd_set = {S[i] for i in range(N) if i % 2 == 0}
even_Yes = {'L', 'U', 'D'}
odd_Yes = {'R', 'U', 'D'}
if even_set <= even_Yes and odd_set <= odd_Yes:
    print('Yes')
else:
    print('No')

Solution (Python):
step = input()

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

f = True
for i in range(len(step)):
    if (i + 1) % 2 == 1 and step[i] not in odd:
        f = False
        break
    elif (i + 1) % 2 == 0 and step[i] not in even:
        f = False
        break
if f == False:
    print('No')
else:
    print('Yes')

Solution (Python):

S = input()

isDance = True
for i, s in enumerate(S):
    if i % 2 != 0 and s == "R":
        isDance = False
    if i % 2 == 0 and s == "L":
        isDance = False

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

Solution (Python):
s = input()

for i, c in enumerate(s):
    if (i + 1) % 2 == 0:
        if not (c == 'L' or c == 'U' or c == 'D'):
            print('No')
            break
    elif (i + 1) % 2 != 0:
        if not (c == 'R' or c == 'U' or c == 'D'):
            print('No')
            break
else:
    print('Yes')

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

Solution (Python):
s = input()

for i, ch in enumerate(s):
    if (i & 1) and ch == 'R':
        print("No")
        exit()
    if (not (i & 1)) and ch == 'L':
        print("No")
        exit()

print("Yes")

Solution (Python):
F = input()
o = {"R", "U","D"}
e = {"L", "U","D"}
flag = False
for i in range(len(F)):
    if( i+1) % 2 == 1:
        if F[i] not in o:
            print("No")
            flag = True
            break
    else:
        if F[i] not in e:
            print("No")
            flag = True
            break
if flag == False:
    print("Yes")

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

X = []
ans = 0

for s in S:
    X.append(s)

X_even = X[1::2]
X_odd = X[::2]

for a in X_even:
    if a == 'L' or a == 'U' or a == 'D':
        pass
    else:
        ans += 1

for a in X_odd:
    if a == 'R' or a == 'U' or a == 'D':
        pass
    else:
        ans += 1
if ans >= 1:
    print('No')
else:
    print('Yes')

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

odd = ('R','U','D')
even = ('L','U','D')

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

print('Yes')

Solution (Python):
from sys import stdin
tap = list(stdin.readline().rstrip())

for i, s in enumerate(tap, start=1):
  if i % 2 != 0:
    if s == "L":
      print("No")
      quit()
  else:
    if s == "R":
      print("No")
      quit()
print("Yes")

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

Solution (Python):
tap_list = list(input())
cnt = 0
for tap in tap_list:
    if cnt == 0:
        if tap == "L":
            cnt = 2
            break
        else:
            cnt = 1
    elif cnt == 1:
        if tap == "R":
            cnt = 2
            break
        else:
            cnt = 0

if cnt == 2:
    print("No")
else:
    print("Yes")

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

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

Solution (Python):
s = list(map(str, input()))
a = 0
def judge(n):
    if n == 0:
        return 'Yes'
    else:
        return 'No'

for i, name in enumerate(s):
    if i % 2 == 0 and name == 'L':
        a += 1
    elif i % 2 == 1 and name == 'R':
        a += 1
    else:
        continue
print(judge(a))

Solution (Python):
import sys

s = input()
i = 0
while i < 100 and i < len(s):
    if s[i] != "R" and s[i] != "U" and s[i] != "D":
        print("No")
        sys.exit()
    i += 2
i = 1
while i < 100 and i < len(s):
    if s[i] != 'L' and s[i] != 'U' and s[i] != 'D':
        print("No")
        sys.exit()
    i += 2

print("Yes")

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

Solution (Python):
S = str(input())
i = 1
ans = 'Yes'
for x in S:
    if i % 2 == 1:
        if S[i-1] == 'L':
            ans = 'No'
            break
    else:
        if S[i-1] == 'R':
            ans = 'No'
            break
    i += 1
print(ans)

Solution (Python):
def solve():
    i = 1
    ans = 'Yes'
    for x in S:
        if i % 2 == 1:
            if S[i-1] == 'L':
                ans = 'No'
                break
        else:
            if S[i-1] == 'R':
                ans = 'No'
                break
        i += 1
    print(ans)

S = str(input())
solve()

Solution (Python):
s=input()

for i in range(len(s)):
	if s[i]=="U" or s[i]=="D":
		continue

	if (i%2==0 and s[i]!="R") or (i%2==1 and s[i]!="L"):
		print("No")
		exit()
print("Yes")

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

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

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

Solution (Python):
S = input()
A = True
for i in S[::2]:
  if i == "L":
    A = False   
for x in S[1::2]:
  if x == "R":
    A = False

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

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

print("Yes")

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

Solution (Python):
s = input()
for idx, i in enumerate(s):
    if idx % 2 == 1 and i in ['L','U','D']:
        continue
    elif idx % 2 == 0 and i in ['R','U','D']:
        continue
    else:
        print('No')
        exit()
print('Yes')

Solution (Python):
S = input()
res = "Yes"
for x in range(int(len(S)/2)+1):
  if 2*x < len(S):
    if S[2*x] not in ["R","U","D"]:
      res = "No"
  if 2*x + 1 < len(S):
    if S[2*x+1] not in ["L","U","D"]:
      res = "No"
print(res)

Solution (Python):
from sys import stdin

S = stdin.readline().rstrip()


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

print(ans)

Solution (Python):
s = list(input())
for i in range(len(s)):
  if i % 2 == 0:
    if not s[i] in "RUD":
      print ("No") 
      exit() 
  else: 
    if not s[i] in "LUD":
      print("No")
      exit()
print("Yes")

Solution (Python):
s = input()
even = True
res = True
for i in s:
    if(even and i in "RUD"):
        pass
    elif(not even and i in "LUD"):
        pass
    else:
        res = False
        break
    even = not even
    
if (res):
    print("Yes")
else:
    print("No")

Solution (Python):
s = [i.upper() for i in str(input())]

k = set('RUD')
g = set('LUD')


kk = set(s[::2])
gg = set(s[1::2])


if kk <= k and gg <= g:
    print('Yes')
else:
    print('No')

Solution (Python):
import re
a = input()
b = re.compile('^([^L][^R])*[^L]?$')
if b.match(a):
	print('Yes')
else:
	print('No')

Solution (Python):
tap_list = list(input())
confort = 0
for i in range(len(tap_list)):
  if (i+1) % 2 == 1 and tap_list[i] == "L":
    confort = 1
  elif (i+1) % 2 == 0 and tap_list[i] == "R":
    confort = 1

if confort == 0:
  print("Yes")
elif confort == 1:
  print("No")

Solution (Python):
import re 
a = input()
b = re.compile('^([^L][^R])*[^L]?$')
if b.match(a):
    print('Yes')
else:
    print('No')

Solution (Python):
import re 
a = input()
b = re.compile('^([^L][^R])*[^L]?$')
if b.match(a):
    print('Yes')
else:
    print('No')

Solution (Python):
import re 
a = input()
b = re.compile(r'^([^L][^R])*[^L]?$')
if b.match(a):
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
cnt = 0
for i in S: 
    cnt += 1
    if cnt % 2 == 1 and i == 'L':
        print("No")
        break
    elif cnt % 2 == 0 and i == 'R':
        print("No")
        break
else:
    print("Yes")

Solution (Python):
s = input()
c = True
for i in range(len(s)):
    if i % 2 == 1:
        if s[i] != 'U' and s[i] != 'D' and s[i] != 'L':
            c = False
    if i % 2 == 0:
        if s[i] != 'U' and s[i] != 'D' and s[i] != 'R':
            c = False

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

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

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

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

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

if  total==0:
    print('Yes')
else:
    print('No')

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

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

if  total==0:
    print('Yes')
else:
    print('No')

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


N = len(S)
X = 0

for i in range(N):
    if i % 2 == 0 and S[i] == "R" or S[i] == "U" or S[i] == "D":
        X += 1
    elif i % 2 == 1 and S[i] ==  "L" or S[i] == "U" or S[i] == "D":
        X += 1

if X == N:
    print("Yes")
else:
    print("No")

Solution (Python):
import re

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

if A.match(S):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
s_odd = s[::2]
s_even = s[1::2]
if s_odd.strip('RUD') or s_even.strip('LUD'):
    print('No')
else:
    print('Yes')

Solution (Python):
S =input()
l =len(S)
letters=[]
for i in range(l):
  letters.append(S[i:i+1])

indicater =0

if l%2==0:
  for i in range(l//2):
    if (letters[2*i]=="R" or letters[2*i]=="U" or letters[2*i]=="D") and (letters[2*i+1]=="L" or letters[2*i+1]=="U" or letters[2*i+1]=="D"):
      indicater=indicater+0
    else:
      indicater=indicater+1
if l%2==1:
  for i in range((l+1)//2):
    if (letters[2*i]=="R" or letters[2*i]=="U" or letters[2*i]=="D"):
      indicater=indicater+0
    else:
      indicater=indicater+1
  for i in range((l-1)//2):
    if (letters[2*i+1]=="L" or letters[2*i+1]=="U" or letters[2*i+1]=="D"):
      indicater =indicater+0
    else:
      indicater =indicater+1

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

Solution (Python):
line=input()

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

for i in range(len(line)):
  if not flag:
    break
  if (i+1)%2==1:
    if line[i] not in a:
      flag=False
      print('No')
  else:
    if line[i] not in b:
      flag=False
      print('No')
if flag==True:
  print('Yes')

Solution (Python):
s=input()
s1=s[::2]
s2=s[1::2]
for i in s1:
    if i=='R' or i=='U' or i=='D':
        pass
    else:
        print("No")
        exit(0)
for i in s2:
    if i=='L' or i=='U' or i=='D':
        pass
    else:
        print("No")
        exit(0)
print("Yes")

Solution (Python):
S=input()

cnt=0
for i in range (0,len(S)):
    if i%2==0 :
        if S[i]!='L':
            cnt+=1
    else:
        if S[i]!='R':
            cnt+=1

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

Solution (Python):
s=input()

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

Solution (Python):
S = input()
left_stp = [v in ["L","U","D"] for i, v in enumerate(S) if i % 2 == 1]
right_stp = [v in ["R","U","D"] for i, v in enumerate(S) if i % 2 == 0]
if all(left_stp) and all(right_stp):
  print("Yes")
else:
  print("No")

Solution (Python):
S = input()

lst = []

for ( i , j ) in enumerate(S) :
  if i % 2 == 1:
    if j not in ["L","U","D"]:      
      print("No")
      exit()
  else:
    if j not in ["R","U","D"]:      
      print("No")
      exit()
print("Yes")

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):
s = list(input())
n = len(s)
temp = True
for i in range(n):
    if (i+1) %2 == 1:
        if s[i] == "L":
            temp = False
            break
    else:
        if s[i] == "R":
            temp = False
            break
if temp:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
S = input()
count = 1
Flag = 0
for i in S:
    if count%2 == 1:
        if i == 'L':
            Flag = 1
    else:
        if i =='R':
            Flag  = 1
    count+=1
if Flag == 1:
    print('No')
else:
    print('Yes')

Solution (Python):
import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """RUDLUDR"""
        output = """Yes"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """DULL"""
        output = """No"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """UUUUUUUUUUUUUUU"""
        output = """Yes"""
        self.assertIO(input, output)
    def test_入力例_4(self):
        input = """ULURU"""
        output = """No"""
        self.assertIO(input, output)
    def test_入力例_5(self):
        input = """RDULULDURURLRDULRLR"""
        output = """Yes"""
        self.assertIO(input, output)
def resolve():
    LR=['RUD','LUD']
    s=input()
    for i in range(len(s)):
        if not(s[i] in LR[i%2]):
            print('No')
            break
    else:
        print("Yes")
if __name__ == "__main__":
    resolve()

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

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

Solution (Python):
S = list(input())
for num,letter in enumerate(S):
    num += 1
    if num % 2 == 1:
        if letter != "R" and letter != "U" and letter != "D":
            print("No")
            exit()
    else:
        if letter != "L" and letter != "U" and letter != "D":
            print("No")
            exit()
print("Yes")

Solution (Python):
tap = input()

for i, j in enumerate(tap, start=1):
  if (i % 2 == 1 and j == "L") or (i % 2 == 0 and j == "R"):
    print("No")
    break
else:
  print("Yes")