Problem:
 Score: 200 points    Problem Statement  Takahashi will do a tap dance. The dance is described by a string S where each character is L , R , U , or D . These characters indicate the positions on which Takahashi should step. He will follow these instructions one by one in order, starting with the first character.  S is said to be easily playable if and only if it satisfies both of the following conditions:   Every character in an odd position ( 1 -st, 3 -rd, 5 -th, \ldots ) is R , U , or D .  Every character in an even position ( 2 -nd, 4 -th, 6 -th, \ldots ) is L , U , or D .   Your task is to print Yes if S is easily playable, and No otherwise.      Constraints   S is a string of length between 1 and 100 (inclusive).  Each character of S is L , R , U , or D .         Input  Input is given from Standard Input in the following format:  S       Output  Print Yes if S is easily playable, and No otherwise.        Sample Input 1 RUDLUDR      Sample Output 1 Yes  Every character in an odd position ( 1 -st, 3 -rd, 5 -th, 7 -th) is R , U , or D .  Every character in an even position ( 2 -nd, 4 -th, 6 -th) is L , U , or D .  Thus, S is easily playable.       Sample Input 2 DULL      Sample Output 2 No  The 3 -rd character is not R , U , nor D , so S is not easily playable.       Sample Input 3 UUUUUUUUUUUUUUU      Sample Output 3 Yes       Sample Input 4 ULURU      Sample Output 4 No       Sample Input 5 RDULULDURURLRDULRLR      Sample Output 5 Yes

Solution (Python):
S = input()

ki = 1
gu = 1

j = 1
count = 0
for s in S:
    count = 0
    if j == 1 and count == 0:
        count = 1
        j = 0
        if s == "R":
            pass
        elif s == "U":
            pass
        elif s == "D":
            pass
        else:
            ki = 0


    if j == 0 and count == 0:
        count =1
        j = 1
        if s == "L":
            pass
        elif s == "U":
            pass
        elif s == "D":
            pass
        else:
            gu = 0


    if ki == 0:
        break
    if gu == 0:
        break

if ki + gu == 2:
    print("Yes")
else:
    print("No")

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

text_1, text_2 = list(text), list(text)
for i in range(int(len(text)/2)):
    text_1.pop(i)
    text_2.pop(i+1)
if len(text) % 2 == 1:
    text_1.pop(len(text_1)-1)

str_1, str_2 = "", ""
for i in range(len(text_1)):
    str_1 += str(text_1[i])
for i in range(len(text_2)):
    str_2 += str(text_2[i])

if str_2.find('L') == -1 and str_1.find('R') == -1:
    print('Yes')
else:
    print('No')

Solution (Python):
s=input()

def evenjudge(obj):
    if obj %2!=0:
        return 1
    else:
        return 2
def oddjudge(obj):
    if obj %2!=0:
        return 2
    else:
        return 1

lo=[i for i in range(0,110,2)]
le=[i for i in range(1,110,2)]

oeflag=evenjudge(len(s))
eoflag=oddjudge(len(s))
for j in lo:
    if s[j] == "L":
        print("No")
        exit(0)
    if j == len(s)-oeflag:
        break


for k in le:
    if len(s)==1:
        break
    if s[k] == "R":
        print("No")
        exit(0)
    if k == len(s)-eoflag:
        break


print("Yes")

Solution (Python):
S = input()
if len(S[0::2]) ==  len(S[0::2]) - S[0::2].count('L'):
    if len(S[1::2]) ==  len(S[1::2]) - S[1::2].count('R'):
        print('Yes')
    else:
        print('No')
else:
    print('No')

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


odd_list = ['R','U','D']

even_list = ['L','U','D']

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

print('Yes')

Solution (Python):
s = list(str(input()))
odd = s[1::2]
g = s[0::2]
if bool("L" in g) == False and bool("R" in odd )== False:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
len_s = len(S)
cnt = 0
flag = True
even_list = ["L","U","D"]
odd_list = ["R","U","D"]
for i in S:
  cnt += 1
  if cnt%2 == 0 and i in even_list:
    pass
  elif cnt%2 == 1 and i in odd_list:
    pass
  else:
    flag = False

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

Solution (Python):

S = input()
ans = "Yes"
for i in range(len(S)):
    if (i+1)%2 == 1:
        if S[i] not in "RUD":
            ans = "No"
            break
    else:
        if S[i] not in "LUD":
            ans = "No"
            break
print(ans)

Solution (Python):
S = list(input())
cnt_yes = 0
for i, s in enumerate(S):
    if (i+1) % 2 == 0:
        if s == 'L' or s == 'U' or s == 'D':
            cnt_yes += 1
    else:
        if s == 'R' or s == 'U' or s == 'D':
            cnt_yes += 1

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

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

if flag == 0:
	print("Yes")
	pass

Solution (Python):
S=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
if a == len(S):
  print("Yes")
else:
  print("No")

Solution (Python):
S = list(open(0).read())
odd  = S[0::2]
even = S[1::2]

uo = set(odd)
ue = set(even)

if('L' in uo or 'R' in ue):
  print('No')
else:
  print('Yes')

Solution (Python):
def main():
  ch=input()
  l=len(ch)
  for i in range(l):
    if(i%2==0 and (ch[i]!='R' and ch[i]!='U' and ch[i]!='D')):
      print('No')
      break
    elif(i%2==1 and (ch[i]!='L' and ch[i]!='U' and ch[i]!='D')):
      print('No')
      break
    elif(i==l-1):
      print('Yes')
  
main()

Solution (Python):


S = str(input())

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

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

Solution (Python):
S=input()
for i,s in enumerate(S):
    if i%2:
        if s!='L' and s!='U' and s!='D':
            print('No')
            break
    else:
        if s!='R' and s!='U' and s!='D':
            print('No')
            break
else:
    print('Yes')

Solution (Python):
S = input()

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

Solution (Python):
S = input()

x = 0

hoge = ['R','L']
ans = 'Yes'

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

print(ans)

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

    odd_list = [] 
    even_list = [] 

    for i in range(len(s)):
        if (i + 1) % 2 == 0:
            even_list.append(s[i])
        else:
            odd_list.append(s[i])

    if 'L' not in odd_list and 'R' not in even_list:
        print('Yes')
    else:
        print('No')
        
if __name__ == '__main__':
    Tap_Dance_abc141()

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

Solution (Python):
s = input()

k = ['L','U','D']
g = ['R','U','D']

for i in range(len(s)):
	if i % 2 == 0:
		if s[i] in g:
			pass
		else:
			print('No')
			exit()
	else:
		if s[i] in k:
			pass
		else:
			print('No')
			exit()
print('Yes')

Solution (Python):
good_odd = ['R', 'U', 'D']  
good_even = ['L', 'U', 'D']  
is_Right_good = True
is_Left_good = True
S = list(input().rstrip())
result = False
for i, s in enumerate(S, start=1):
    if i % 2 == 0 and is_Left_good:
        if s not in good_even:
            is_Left_good = False
    elif i % 2 == 1 and is_Right_good:
        if s not in good_odd:
            is_Right_good = False
if is_Right_good and is_Left_good:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys
import collections
import bisect
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)
import math
S = raw_input()
S = list(S)
for idx, val in enumerate(S):
    if idx & 1:
        if val not in ('L', 'U', 'D'):
            print('No')
            exit()
    else:
        if val not in ('R', 'U', 'D'):
            print('No')
            exit()
print('Yes')

Solution (Python):
dance = input()

for i in range(len(dance)):
    if i%2==0:
        if dance[i] != 'R' and dance[i] != 'D' and dance[i] != 'U':
            print("No")
            exit()
    else:
        if dance[i] != 'L' and dance[i] != 'D' and dance[i] != 'U':
            print("No")
            exit()

print("Yes")

Solution (Python):
S = input()

Odd= S[0::2]
Even= S[1::2]

oddset  = {'R', 'U', 'D'}
evenset = {'L', 'U', 'D'}

if oddset >= set(Odd) and evenset >= set(Even):
    ans = 'Yes'
else :
    ans = 'No'
print(ans)

Solution (Python):
moji = input().rstrip()
mojilist = list(moji)
evenset = set()
oddset = set()

for i in range(len(mojilist)):
  if i % 2 == 0:
    oddset.add(mojilist[i])
  else:
    evenset.add(mojilist[i])

if ((oddset <= {"R","U","D"}) and (evenset <= {"L","U","D"})):
  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):
input_string = list(input())


flg = 0

for num, char in enumerate(input_string):
    if num%2 == 0:

        if (char != 'R') and (char != 'U') and (char != 'D'):
            flg = 1
    else:

        if (char != 'L') and (char != 'U') and (char != 'D'):
            flg = 1

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

Solution (Python):
g = ['L', 'U', 'D']
k = ['R', 'U', 'D']
a = input()
b = 0
for i in range(len(a)):
    if (i+1) % 2 == 0:
        if a[i] in g:
            pass
        else:
            print('No')
            b = 1
            break
    else:
        if a[i] in k:
            pass
        else:
            print('No')
            b = 1
            break
if b == 0:
    print('Yes')

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

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

print(flag)

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

print(b)

Solution (Python):

S=str(input())
n=len(S)
p=0
if(n==1):
    if(S=="L"):print("No")
    else:print("Yes")
else:
    for i in range(1,n,2):
        if(S[i-1]=="L"):
            print("No")
            break
        if(S[i]=="R"):
            print("No")
            break
        else: p+=1
    if(p == n//2):print("Yes")

Solution (Python):
n = str(input())
d = []
p = []
i = 1
s = 1
l = 1
for k in n:
 if i % 2 == 0:
  if k == "L" or k == "U" or k == "D":
   pass
  else:
   s = 0
 else:
  if k == "R" or k == "U" or k == "D":
   pass
  else:
    l = 0
 i = i + 1

if s and l == 1:
 print("Yes")
else:
 print("No")

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

Solution (Python):
s = input()

s = list(s)
s1=s[0::2]
s2=s[1::2]

flag = "Yes"

for a in s1:
  if (a != 'R') and (a != 'U') and (a != 'D'):
    flag = "No"
for a in s2:
  if (a != 'L') and (a != 'U') and (a != 'D'):
    flag = "No"

print(flag)

Solution (Python):
Dance = input()

import re

pattern1 = r"[^RUD]"
pattern2 = r"[^LUD]"

if re.search(pattern1, Dance[0::2]) or re.search(pattern2, Dance[1::2]):
  print("No")
else:
  print("Yes")

Solution (Python):
S = input()


def isEasy(s):
    for i in range(len(s)):
        if (i+1) % 2 == 0:
            if S[i] == "R":
                return False
        else:
            if S[i] == "L":
                return False
    return True


print("Yes" if isEasy(S) else "No")

Solution (Python):
S = input()

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

print(flag)

Solution (Python):
S=input()

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

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

Solution (Python):
S=input()
x=0
if len(S)%2==1:
 for i in range(len(S)//2+1):
  if S[2*i]=='L':
   x= x+1
  else:
   x= x
else:
 for i in range(len(S)//2):
  if S[2*i]=='L':
    x= x+1
  else:
    x= x

for j in range(len(S)//2):  
  if S[2*j+1]=='R':
   x= x+1
  else:
   x= x
    
if x==0:
  print('Yes')
else:
  print('No')

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

Solution (Python):
S = input()

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

hard = 0


for i in range(len(S)):
    moji = S[i]
    if i % 2 == 1:

        if moji not in gusu:
            hard = 1
            break
    if i % 2 == 0:

        if moji not in kisu:
            hard = 1
            break
if hard == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
import os

S = input()

for i in range(0,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):
N=list(input())
H=[]
for i in range(len(N)) :
    if N[i] == "U" or N[i] == "D" :
            pass
    else:
        if i % 2 == 1 :
            if N[i] == "L" :
                pass
            else :
                H.append("No")
        else:
            if N[i] == "R" :
                pass
            else :
                H.append("No")
if "No" in H :
    print("No")
else:
    print("Yes")

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

Solution (Python):
x = input()
b = len(x)
ans = ''
for a in range(0,b,2):
    if x[a] == 'R' or x[a] == 'D' or x[a] == 'U':
        ans = 'Yes'
    else:
        ans = 'No'
        break
for a in range(1,b,2):
    if ans == 'No':
        break
    elif x[a] == 'L' or x[a] == 'D' or x[a] == 'U':
        ans = 'Yes'
    else:
        ans = 'No'
        break
print(ans)

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

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

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

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

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

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

ans ='Yes'

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

print(ans)

Solution (Python):
def main():
    S = input().strip()
    taps = [('R', 'U', 'D'), ('L', 'U', 'D')]
    cannot_taps = ['L', 'R']
    all_can_taps = True
    for i in range(len(S)):
        if S[i] == cannot_taps[i % 2]:
            all_can_taps = False
    print('Yes' if all_can_taps else 'No')

if __name__ == "__main__":
    main()

Solution (Python):


def tap_easy_detector(tap_list):
	kisuu={"R", "U", "D"}
	gusu={"L", "U", "D"}

	tap_gusu_set= set(tap_list[0::2])
	tap_kisuu_set= set(tap_list[1::2])

	if tap_kisuu_set <= gusu and tap_gusu_set<= kisuu:
		return "Yes"
	else:
		return "No"

if __name__ == '__main__':
    Sequence = input()
    input_list = list(Sequence)
    print(tap_easy_detector(input_list))

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

se = s[0::2]
so = s[1::2]

if ('L' in se):
  print('No')
elif ('R' in so):
  print('No')
else:
  print('Yes')

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

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

A = ['Yes','No']
k = 0
glist = ['R','U','D']
klist = ['L','U','D']

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

print(A[k])

Solution (Python):
S = input()
count = True
for i,s in enumerate(S):
    if i%2 == 0:
        if s != 'R' and s != 'U' and s != 'D':
            count = False
            break
    if i%2 != 0:
        if s != 'L' and s != 'U' and s != 'D':
            count = False
            break
            
if count == False:
    print('No')
else:
    print('Yes')

Solution (Python):
steps = list(list(input()))
even = True
odd = True
for i in range(0, len(steps), 2):
    if not (steps[i] == 'R' or  steps[i] == 'U' or  steps[i] == 'D'):
        odd = False

for i in range(1, len(steps), 2):
    if not (steps[i] == 'L' or  steps[i] == 'U' or  steps[i] == 'D'):
        even = False

if even and odd:
    print("Yes")
else:
    print("No")

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

for i, char in enumerate(s):
    if (i+1)%2 == 0:
        if char == 'R':
            count = count + 1
    elif (i+1)%2 == 1:
        if char == 'L':
            count = count + 1

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

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

k = sorted(set(s[0::2]))
g = sorted(set(s[1::2]))

if 'L' in k or 'R' in g:
    print('No')
else:
    print('Yes')

Solution (Python):
s = str(input())
result = []

for i in range(len(s)):
    if(i%2==0):
        odd = any((s[i]== x for x in ['R','U','D']))
        result.append(odd)
    else:
        even = any((s[i]== x for x in ['L','U','D']))
        result.append(even)

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

Solution (Python):

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

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

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

ans_list = []
for i in range(len(order)):
    if i % 2 == 1:
        if order[i] in ['L', 'U', 'D']:
            ans = True
        else:
            ans = False
        ans_list.append(ans)
    else:
        if order[i] in ['R', 'U', 'D']:
            ans = True
        else:
            ans = False
        ans_list.append(ans)
        
if False in ans_list:
    print('No')
else:
    print('Yes')

Solution (Python):
ki = {"R","U","D"}
gu = {"L","U","D"}

n = str(input())
n_l = len(n)
N = []
for i in range(n_l):
    N.append(n[i])

n_ki = set(N[::2])
n_gu = set(N[1::2])
if n_ki.issubset(ki) and n_gu.issubset(gu):
    print("Yes")
else:
    print("No")

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

print(result)

Solution (Python):
strings = input()
l = len(strings)
even = []
odd = []
i = 0
while i <= l:
  try:
    odd.append(strings[i])
  except:
    pass
  try:
    even.append(strings[i+1])
  except:
    pass
  i += 2

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

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

i = 0
while i < len(S):
    if i % 2 == 0 and S[i]=="L":
        ans = False
    elif i % 2 == 1 and S[i]=="R":
        ans = False
    else:
        t = 1
    i += 1
   
if ans:
    print("Yes")
else:
    print("No")

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

Solution (Python):
import sys
sys.setrecursionlimit(int(1e6))

S = input()

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

print('Yes')

Solution (Python):
S = list(input())
A = []

for i,x in enumerate(S):
    if (i+1)%2 == 0 and x == "R":
        A.append("No")
    elif (i+1)%2 == 1 and x == "L":
        A.append("No")
    else:
        A.append("Yes")

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

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

Solution (Python):
S = input()

evenChecker = 'Yes'
oddChecker = 'Yes'

for i, s in enumerate(S):
    if (i%2==0) and (s=='L') and (evenChecker=='Yes'):
        evenChecker = 'No'
    if (i%2==1) and (s=='R') and (oddChecker=='Yes'):
        oddChecker = 'No'
if (evenChecker=='Yes') and (oddChecker=='Yes'):
    print('Yes')
else: print('No')

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


flag = False

for i ,list in enumerate(lists):
    if (i + 1) % 2 == 1:
        if list == "R" or list == "U" or list == "D":
            flag = True
        else:
            flag = False
            break

    if (i + 1) % 2 == 0:
        if list ==  "L" or list == "U" or list == "D":
            flag = True
        else:
            flag = False
            break

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

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

Solution (Python):
import numpy as np
S = list(map(str,input().split()))
S = [c for c in S[0]]

result = 0
for i in range(len(S)):
    if (i % 2 == 1) and ((S[i] == 'L') or (S[i] == 'U') or (S[i] == 'D')):
        result += 1
    if (i % 2 == 0) and ((S[i] == 'R') or (S[i] == 'U') or (S[i] == 'D')):
        result += 1
        
if result == len(S):
    print('Yes')
else:
    print('No')

Solution (Python):
s=raw_input()
a=s[::2]
b=s[1::2]

if "L" in a or "R" in b:
    print "No"
else:
    print "Yes"

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

  if is_easy(s):
    print("Yes")
  else:
    print("No")

def is_easy(str):
  odd = ["R", "U", "D"]
  even = ["L", "U", "D"]
  rtn = True

  odds = []
  evens = []

  for i in range(len(str)):
    if i % 2 == 0:
      odds.append(str[i])
    else:
      evens.append(str[i])

  for i in range(len(odds)):
    if not odds[i] in odd:
      rtn = False
  for i in range(len(evens)):
    if not evens[i] in even:
      rtn = False
  return rtn

if __name__ == "__main__":
    main()

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

Solution (Python):
def main():
    S = input()
    for index, s in enumerate(S):
        if index % 2 == 0:
            if s == 'L':
                print('No')
                exit()
        else:
            if s == 'R':
                print('No')
                exit()
    if index == len(S) - 1:
        print('Yes')



if __name__ == '__main__':
    main()

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

Solution (Python):
s = input()
if s=='L':
  print('No')
  exit()
for i in range(0,len(s),2):
  for j in range(1,len(s),2):
    if s[i] not in 'RUD' or s[j] not in 'LUD':
      print('No')
      exit()
print('Yes')

Solution (Python):
S = input()
l = len(S)
s = list(S)
c = 0
s.append("U")

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

Solution (Python):
O={'R','U','D'}
E={'L','U','D'}
S=input()
if set(S[::2]) <= O and set(S[1::2]) <= E:
  print('Yes')
else:
  print('No')

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

N = len(S)

gusu = S[1::2]
kisu = S[::2]

g = 1
for i in range(len(gusu)):
    if gusu[i] == "L" or gusu[i] == "U" or gusu[i] == "D":
        g = g*1
    else:
        g = 0

k = 1
for i in range(len(kisu)):
    if kisu[i] == "R" or kisu[i] == "U" or kisu[i] == "D":
        k = k*1
    else:
        k = 0

if g*k == 1:
    print("Yes")
else:
    print("No")

Solution (Python):






dance = input()





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

Solution (Python):
S = input()
flag = True
cnt = 1
for char in S:
    if cnt % 2 == 0:
        if not (char == "L" or char == "U" or char == "D"):
            flag = False
    else:
        if not (char == "R" or char == "U" or char == "D"):
            flag = False
    cnt = cnt + 1

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

Solution (Python):
while True:
    try:
        string = input()
        for i in range(0, len(string)):
            if i % 2 == 0:
                if string[i] == 'L':
                    print('No')
                    break
            else:
                if string[i] == 'R':
                    print('No')
                    break
        else:
            print('Yes')
    except:
        break

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

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

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

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

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

Solution (Python):
S = input().rstrip()
R = "RUD"
L = "LUD"
r = 0
l = 0

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

Solution (Python):
S=input()
N=len(S)
O={"R","U","D"}
E={"L","U","D"}
A=1
B=1
for i in range(N):
    if i%2==1:
        if S[i] in E:
            B=B*1
        else:
            B=B*0
    else:
        if S[i] in O:
            A=A*1
        else:
            A=A*0


if A*B==1:
    print("Yes")
else:
    print("No")

Solution (Python):


S = input()

odd = 'R'
even = 'L'

end = len(S)

flag = True

for i in range(0, end, 2):
    if S[i] == even:
        flag = False


for i in range(1, end, 2):
    if S[i] == odd:
        flag = False


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

Solution (Python):

s = input()
L = 'L'
R = 'R'
odds = ''
evens = ''
for i in range(len(s)):
    if i % 2 == 0:
        odds += s[i]
    else:
        evens += s[i]
if (L in odds) or (R in evens):
    print('No')
else:
    print('Yes')

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 7)

S = input()

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

Solution (Python):
S = input()
c = 0
for i in range(len(S)):

    if i % 2 == 0:
        if S[i] in 'RUD':
            c += 1

    elif i % 2 ==1:
        if S[i] in 'LUD':
            c += 1


if c==len(S):
    print('Yes')

else:
    print('No')

Solution (Python):
import sys


		
def main():
	s = input()
	odd=set(['R','U','D'])
	eve=set(['L','U','D'])
	for i,c in enumerate(s):
		if (i+1) % 2 == 1 and c not in odd:
			return 'No'
		elif (i+1) % 2 == 0 and c not in eve:
			return 'No'
	return 'Yes'
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

Solution (Python):
s=input()

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

Solution (Python):
S = input()

even = set({})
odd = set({})
for i in range(len(S)):
    if i % 2 == 0:
        even.add(S[i])
    else:
        odd.add(S[i])


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

Solution (Python):
s = input()

ans = "Yes"

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

Solution (Python):
def TapDance():
	S = input()
	danceEasyOdd = True
	danceEasyEven = True
	for index, step in enumerate(S): 
		if index % 2 == 0:
			if step == 'L':
				danceEasyOdd = False
				break
		else:
			if step == 'R':
				danceEasyEven = False
				break

	if danceEasyOdd and danceEasyEven:
		print('Yes')
	else:
		print('No')

TapDance()

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

flag = 'Yes'

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

print(flag)

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

Solution (Python):


s = [s for s in input()]
pk = ['R', 'U', 'D']
pg = ['L', 'U', 'D']

ans = 'Yes'
for i, n in enumerate(s):
    if i % 2 == 0:
        if n in pk:
            continue
        else:
            ans = 'No'
            break
    else:
        if n in pg:
            continue
        else:
            ans = 'No'
            break
print(ans)

Solution (Python):
S = list(str(input()))
S.insert(0, 'L')

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

Solution (Python):
rr = raw_input
rri = lambda: int(raw_input())
rrm = lambda: map(int, raw_input().split())
 
def solve(S):
    return all(c in 'RUD' for c in S[::2]) and all(c in 'LUD' for c in S[1::2])
    
 
print 'Yes' if solve(rr()) else 'No'