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

even = collections.defaultdict(int)
odd = collections.defaultdict(int)

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

odd = list(odd.keys())
even = list(even.keys())

if "R" in odd:
    if odd.index("R") >= 0:
        odd.pop(odd.index("R"))
if "U" in odd:
    if odd.index("U") >= 0:
        odd.pop(odd.index("U"))
if "D" in odd:
    if odd.index("D") >= 0:
        odd.pop(odd.index("D"))

if len(odd) != 0:
    print("No")
    exit(0)

if "L" in even:
    if even.index("L") >= 0:
        even.pop(even.index("L"))
if "U" in even:
    if even.index("U") >= 0:
        even.pop(even.index("U"))
if "D" in even:
    if even.index("D") >= 0:
        even.pop(even.index("D"))

if len(even) != 0:
    print("No")
else:
    print("Yes")

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

Solution (Python):
s = input()
kisuu = ['R', 'U', 'D' ]
gusuu = ['L', 'U', 'D' ]
ki = []
gu = []

for i in range(len(s)):
    if i % 2 != 0:
        gu.append(s[i])
    else:
        ki.append(s[i])

if set(gu).issubset(gusuu) and set(ki).issubset(kisuu):
    print('Yes')
else:
    print('No')

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

kisu = ['R', 'U', 'D']
guu = ['L', 'U', 'D']
check = 'Yes'
for i, st in enumerate(S):
		if (i + 1) % 2 == 0:
				if not st in guu:
						check = 'No'
		else:
				if not st in kisu:
						check = 'No'

print(check)

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

Solution (Python):
tmp = input()
lis = list(tmp)
length = len(lis)
judge = 0
for i in range(0, length, 2):
    if lis[i] == 'L':
        judge = 1
for j in range(1, length, 2):
    if lis[j] == 'R':
        judge = 1

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

Solution (Python):
S = input()

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

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

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

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

Solution (Python):

S = str(input())

odd_list = ["R", "U", "D"]
even_list = ["L", "U", "D"]

ans = "Yes"
for i in range(len(S)):
    if (i + 1) % 2 == 0:
        if S[i] in even_list:
            continue
        else:
            ans = "No"
    else:
        if S[i] in odd_list:
            continue
        else:
            ans = "No"

print(ans)

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

for a in range(len(s)) :
    if(s[a]=='R' or s[a]=='U' or s[a]=='D') and (a%2==0) :
        a = 1
    elif(s[a]=='L' or s[a]=='U' or s[a]=='D') and (a%2==1) :
        a = 1
    else :
        print('No')
        break

else :
    print('Yes')

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

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

ans = "Yes"

if odd.count("L")>0:
    ans = "No"
if even.count("R")>0:
    ans = "No"

print(ans)

Solution (Python):
s = list(input())
odds = set(s[::2])
easy_odds = {'R', 'U', 'D'}
evens = set(s[1::2])
easy_evens = {'L', 'U', 'D'}
if odds <= easy_odds and evens <= easy_evens:
    print('Yes')
else:
    print('No')

Solution (Python):
Step = input()

easyStep = 'Yes'

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

print(easyStep)

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

Kisuu = ['R', 'U', 'D']
Guusu = ['L', 'U', 'D']
flag = True

for i in range(len(N)):

    if (i+1) % 2 != 0:
        if N[i] not in Kisuu:
            flag = False
    elif (i+1) % 2 == 0:

        if N[i] not in Guusu:
            flag = False


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

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

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

print(cout)

Solution (Python):
n = input()
chars = list(n)

f = True
for i in range(len(chars)):
  if i % 2 == 0 and chars[i] == 'L':
    f = False
    break
  elif i % 2 == 1 and chars[i] == 'R':
    f = False
    break

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

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

Solution (Python):
s = list(input())
k = ["R", "U", "D"]
g = ["L", "U", "D"]
coun = 0
for i in range(1,len(s)+1):
  if i % 2 == 1 and s[i-1] == "L":
    break
  elif i % 2 == 0 and s[i-1]=="R":
    break
  coun += 1

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

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

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

Solution (Python):
s = input()

list = list(s)

kisuu = list[0::2]
guusuu = list[1::2]

if "L" in kisuu or "R" in guusuu:
    print("No")
else:
    print("Yes")

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

res = "Yes"

for index, value in enumerate(s):
    index += 1
    if index % 2 == 0:
        if value != 'L' and value != 'U' and value != 'D':
            res = "No"
            break
    else:
        if value != 'R' and value != 'U' and value != 'D':
            res = "No"
            break

print(res)

Solution (Python):
S = input()

for s in S[0::2]:
    if s != 'R' and s != 'U' and s != 'D':
        print('No')
        quit()

for s in S[1::2]:
    if s != 'L' and s != 'U' and s != 'D':
        print('No')
        quit()

print('Yes')

Solution (Python):
s = input()
s1 = s[::2]
s2 = s[1::2]
s1 = s1.replace('R','')
s1 = s1.replace('U','')
s1 = s1.replace('D','')
s2 = s2.replace('L','')
s2 = s2.replace('U','')
s2 = s2.replace('D','')
if s1 == '' and s2 == '':
  print('Yes')
else:
  print('No')

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

Solution (Python):
S = list(input())
guu = []
kis = []
for i in range(len(S)):
    if i%2 == 0:
        guu.append(S[i])
    else:
        kis.append(S[i])
if "L" in guu or "R" in kis:
    print("No")
else:
    print("Yes")

Solution (Python):


if __name__ == "__main__":
    s = input()
    ud = set(['U', 'D'])
    o = list(set(s[0::2]) - ud)
    e = list(set(s[1::2]) - ud)
    if 'L' in o or 'R' in e: print("No")
    else: print("Yes")

Solution (Python):
oddPrevensionStep = "L"
evenPrevensionStep = "R"

count = 1
dance = True
for h in input():
    if (0 == count % 2):
        if (h == evenPrevensionStep):
            dance &= False
    else:
        if (h == oddPrevensionStep):
            dance &= False
    count += 1


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

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):
steps = raw_input()

a = ['R', 'L']

yes = True
for i in xrange(len(steps)):
    if steps[i] == a[(i + 1) % 2]:
        yes = False
        break



if yes: print "Yes"
else:   print "No"

Solution (Python):
import sys

S = input()
check = ["R", "U", "D"]
for s in list(S):
    if not s in check:
        print("No")
        sys.exit()
    if check[0] == "R":
        check[0] = "L"
    else:
        check[0] = "R"
print("Yes")

Solution (Python):
S = input()

ans = 0

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

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

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

Solution (Python):
S = list(input())
S_k = S[0::2]
S_g = S[1::2]
k_tf = ('L' in S_k)
g_tf = ('R' in S_g)
answer = k_tf + g_tf
if answer>=1:
  print('No')
else:
  print('Yes')

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

Solution (Python):
s = input()

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

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

print("Yes")

Solution (Python):
import numpy as np
import math
import subprocess
import random
import os
import sys


s=input()

nums=len(s)

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

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

Solution (Python):
S = raw_input()
odd= set(['R', 'U', 'D'])
even= set(['L', 'U', 'D'])
def check(S):
    for i, ch in enumerate(S):
        if (i +1) % 2==0:
            
            if ch not in even:
                return False
        else:
            if ch not in odd:
                return False
    return True
easy= check(S)
if easy:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()

size = len(s)
judge = 0
ki = ['R','U','D']
gu = ['L','U','D']


for i in range((size+1)//2):
    if s[i*2] not in ki:
        judge += 1

for i in range(size//2):
    if s[i*2+1] not in gu:
        judge += 1
        
if judge == 0:
    print('Yes')
else:
    print('No')

Solution (Python):

l = list(input())

o = l[0::2]
e = l[1::2]

if "L" in o or "R" in e:
    print("No")
else:
    print("Yes")

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

Solution (Python):
S = input()
l = len(S)
S_list = []
flag = False
for i in S:
    S_list.append(i)

for i in range(l):
    if i % 2 == 0 and S_list[i] == 'L':
        flag = True
    elif i % 2 == 1 and S_list[i] == "R":
        flag = True
    else:pass


if flag:
    print("No")

else:
    print("Yes")

Solution (Python):
s = input()

if s[0::2].count("L") == s[1::2].count("R") == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()

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

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

    for i in range(len(s)):
        curr = s[i]
        if i % 2 == 0:
            if curr not in ["R", "U", "D"]:
                print("No")
                return
        else:
            if curr not in ["L", "U", "D"]:
                print("No")
                return
    print("Yes")
    
resolve()

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

Solution (Python):
S=input()
ans=True
for i in range(len(S)):
    if((i+1)%2==1):
        if(not(S[i]=="R" or S[i]=="U" or S[i]=="D")):
            ans=False
            continue
    else:
        if (not (S[i] == "L" or S[i] == "U" or S[i] == "D")):
            ans = False
            continue

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

Solution (Python):
s = input()

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

Solution (Python):
s1 = input()
r1 = "Yes"

for i1 in range(len(s1)):
    if i1 % 2 == 0:
        if s1[i1] == "L":
            r1 = "No"
    else:
        if s1[i1] == "R":
            r1 = "No"

print(r1)

Solution (Python):
N = input()

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

print(result)

Solution (Python):

import sys


def main():
    arr =input()
    even = arr[0::2]
    odd = arr[1::2]

    even = even.replace("U","")
    even = even.replace("D","")
    even = even.replace("R","")

    if len(even) > 0:
        print("No")
        sys.exit()

    odd = odd.replace("U","")
    odd = odd.replace("D","")
    odd = odd.replace("L","")

    if len(odd) > 0:
        print("No")
    else:
        print("Yes")










if __name__ =='__main__':
    main()

Solution (Python):
s=str(input())
if len(s)==1:
	if s[0]=='L':
		print('No')
	else:
		print('Yes')
else:		
	ans='Yes'
	i=0
	while 2*i+1<len(s):
		if s[2*i]=='L':
			ans='No'
		if s[2*i+1]=='R':
			ans='No'
		i+=1
	print(ans)

Solution (Python):

s = list(input())
p=0
a='Yes'
for i in s:
    if p%2==0:
        if i=='L':
            a='No'
            break
    else:
        if i=='R':
            a="No"
            break
    p+=1
print(a)

Solution (Python):
s=input()
o=["R","U","D"]
e=["L","U","D"]
i=0
for t in range(len(s)):
  if(i==1):
    break
  if(t%2==0):
    if(s[t] not in o):
      print("No")
      i=1
      break
  else:
    if(s[t] not in e):
      print("No")
      i=1
      break
if(i==0):
	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:
            count = 0
    else:
        if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
            count += 1
        else:
            count = 0

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

Solution (Python):
def main():
    S = input()
    Even = []
    Odd = []

    for i in range(len(S)):
        if i % 2 == 0:
            Even.append(S[i])
        else:
            Odd.append(S[i])

    if not Even.__contains__("L") and not Odd.__contains__("R"):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

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

Solution (Python):
S = input()
li = list(S)
ans = 'Yes'
for i, a in enumerate(li):
    if (i+1)%2 == 1:
        if a == 'L':
            ans = 'No'
            
    else:
        if a == 'R':
            ans = 'No'
            
print(ans)

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

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

S = list(input())

for i, s in enumerate(S):
    if (i + 1) % 2 == 0:
        if s not in even:
            print('No')
            exit()
    else:
        if s not in odd:
            print('No')
            exit()

print('Yes')

Solution (Python):
tap = input()

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

if odd.count('R')+odd.count('U')+odd.count('D')==len(odd) and even.count('L')+even.count('U')+even.count('D')==len(even):
  print('Yes')
else:
  print('No')

Solution (Python):
s = input()
c = 0
lste = []
lsto = []

for i in range(len(s)):
  if i%2 == 0:
    lsto.append(s[i])
  if i%2 != 0:
    lste.append(s[i])
      
if "L" not in lsto and "R" not in lste:
  print("Yes")
else:
  print("No")

Solution (Python):
'use strict'
S = input()

result = 'Yes'

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

print(result)

Solution (Python):
s = str(input())
o = set()
e = set()
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] in ["R","U","D"]:
            pass
        else:
            print("No")
            exit()
    else:
        if s[i] in ["L","U","D"]:
            pass
        else:
            print("No")
            exit()
print("Yes")

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

Solution (Python):
S = input()

flag = 0
ans = ['Yes', 'No']

for (i,s) in enumerate(S):
    num = i+1
    if num%2 == 1:
        if s == 'L':
            flag = 1
    elif num%2 == 0:
        if s == 'R':
            flag = 1
print(ans[flag])

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    odd = ['R', 'U', 'D']
    evn = ['L', 'U', 'D']

    res = YES
    for i, l in enumerate(S):
        if i%2 != 0:
            if not l in evn:
                res = NO
        else:
            if not l in odd:
                res = NO
    print(res)



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):
def func():
    S = input()

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

        if (i+1) % 2 == 0 and S[i] == 'R':
            ans = 'No'
            break
    
    print(ans)

if __name__ == '__main__':
    func()

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()
C = "Yes"
for i in range(len(S)):
	if (i+1)%2 == 0: 
		if S[i] == "R":
			C = "No"
			break
	else:
		if S[i] == "L":
			C = "No"
			break
print(C)

Solution (Python):
S = input()
cnt = 1
for s in S:
  if cnt%2== 1:
    if s in ["R","U","D"]:
      cnt += 1
    else:
      print('No')
      break
  elif cnt%2==0:
    if s in ["L","U","D"]:
      cnt += 1
    else:
      print('No')
      break
else:
  print('Yes')

Solution (Python):
s=list(input())
a=s[::2]
b=s[1::2]
if a.count('R')+a.count('U')+a.count('D')==len(a) and b.count('L')+b.count('U')+b.count('D')==len(b):
    print('Yes')
    exit()
print('No')

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

Solution (Python):
s = input()

odd = set(s[::2])
even = set(s[1::2])

judge = (odd <= {'R', 'U', 'D'}) and (even <= {'L', 'U', 'D'})

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

Solution (Python):
import numpy as np
S=input()
count=0
for i in range(len(S)):
    if i%2==0:
        if S[i]=='L':
            count+=1
            break
    else:
        if S[i]=='R':
            count+=1
            break
if count==0:
    print('Yes')
else:
    print('No')

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

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

for i in range(len(s)):
  if i % 2 == 0:
    if s[i] not in "RUD":
      flag = False
      break
  else:
    if s[i] not in "LUD":
      flag = False
      break

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

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

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

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

Solution (Python):
s = list(str(input()))
ans = "Yes"
for i, n in enumerate(s):
  if i % 2 == 0:
    if n == "R" or n == "U" or n == "D":
      continue
    else:
      ans = "No"
  else:
    if n == "L" or n == "U" or n == "D":
      continue
    else:
      ans = "No"
print(ans)

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

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

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

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

gusu_steps = set(steps[0::2])
kisu_steps = set(steps[1::2])

if ('L' in gusu_steps) or ('R' in kisu_steps):
    print('No')
else:
    print('Yes')

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

Solution (Python):
s = input()

for i, si in enumerate(s):

    if (i+1)%2==0 and si in "LUD":
        continue
    elif (i+1)%2==1 and si in "RUD":
        continue
    else:
        print("No")
        exit()

print("Yes")

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

even_s_list = ['R', 'U', 'D']
odd_s_list = ['L', 'U', 'D']
result = 'Yes'
for i, c in enumerate(s):
    if (i % 2 == 0) and not (c in even_s_list):
        result = 'No'
        break
    if (i % 2 == 1) and not (c in odd_s_list):
        result = 'No'
        break

print(result)

Solution (Python):
inp = input ()

inplist = [char for char in inp]

playable = True

for i in range (0,len(inplist)):
    if i%2 == 0:
        if inplist[i] not in ('RUD'):
          playable = False
          break
    else:
        if inplist[i] not in ('LUD'):
          playable = False
          break

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

Solution (Python):
S=input()

good=True

for i, s in enumerate(S):
  if (i+1)%2==0:
    if s in ['L','U','D']:
      pass
    else:
      good=False
  else:
    if s in ['R','U','D']:
      pass
    else:
      good=False
  
if good:
  print('Yes')
else:
  print('No')

Solution (Python):
S = input()
S += "UUU"
humiyasui = True
for i in range(0,len(S)-1,2):
    if S[i] == "L":
        humiyasui = False
    if S[i+1] == "R":
        humiyasui = False

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

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    for i in range(len(S)):
        if(i%2 == 0 and S[i] in ('R', 'U', 'D')):
            continue
        elif(i%2 == 1 and S[i] in ('L', 'U', 'D')):
            continue
        else:
            
            print(NO)
            exit()
    print(YES)

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

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

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
def main():
  ss = list(input())
  c = 0
  for i in range(len(ss)):
    if i % 2 == 0 and ss[i] == 'L':
      print('No')
      break
    elif i % 2 == 1 and ss[i] == 'R':
      print('No')
      break
    else:
      c += 1
  if c == len(ss):
    print('Yes')


if __name__ == '__main__':
  main()

Solution (Python):


s = input()
tap = list(s)
e_tap = tap[1::2]
o_tap = tap[0::2]

o = 0
e = 0
for i in e_tap:
    if i == 'R':
        o = 1
        break

for i in o_tap:
    if i == 'L':
        e = 1
        break

if o == 0 and e == 0:
    print('Yes')
else:
    print('No')

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

S = input().strip()
ans = 1
odd = set(['R', 'U', 'D'])
even = set(['L', 'U', 'D'])

for i, letter in enumerate(S):
    i += 1
    if i % 2 == 1:
        if letter not in odd:
            ans *= 0
    if i % 2 == 0:
        if letter not in even:
            ans *= 0

if ans == 1:
    print('Yes')
elif ans == 0:
    print('No')

Solution (Python):
S = input()
kisuu = S[::2]
guusuu = S[1::2]

if "L" not in kisuu:
    if "R" not in guusuu:
        ans = "Yes"
    else:
        ans = "No"
else:
    ans = "No"
print(ans)

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

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

Solution (Python):
S = input()

ans1 = 0
ans2 = 0

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

if ans1 + ans2 == 0:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

flag = True

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

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

Solution (Python):
s = input()
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']
isEasy = True
for i, t in enumerate(s):
    if i % 2 == 0 and not t in odd:
        isEasy = False
        break
    elif i % 2 != 0 and not t in even:
        isEasy = False
        break
if isEasy:
    print('Yes')
else:
    print('No')

Solution (Python):
s=input()

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

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

Solution (Python):
import sys
from collections import defaultdict, deque


def main():
    S = input()

    o = ['R', 'U', 'D']
    e = ['L', 'U', 'D']

    counter = 0
    for i in range(len(S)):
        if (i+1) % 2 == 1 and S[i] in o or (i+1) % 2 == 0 and S[i] in e:
            counter += 1
    if counter == len(S):
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

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

Solution (Python):
s = input()
n = len(s)
tmp = 0
ans = 'Yes'
flag = True

while(tmp < n):
  if(tmp%2 == 0):
    if(s[tmp] == 'R' or s[tmp] == 'U' or s[tmp] == 'D'):
      pass
    else:
      flag = False
      break
  else:
    if(s[tmp] == 'L' or s[tmp] == 'U' or s[tmp] == 'D'):
      pass
    else:
      flag = False
      break
  if flag == False:
    ans = 'No'
    break
  tmp += 1
if flag == False:
  print("No")
else:
  print("Yes")

Solution (Python):
s=list(input())
extract1 = s[::2]
extract2 = s[1::2]

if extract1.count('L')!=0:
    print('No')
elif extract2.count('R')!=0:
    print('No')
else:
    print('Yes')

Solution (Python):
s = input()

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

odd_flg = True
even_flg = True

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

Solution (Python):


s = list(map(str, input()))
for w in range(1, len(s), 2):
    if 'R' in s[w]:
        print("No")
        exit()

for w in range(0, len(s), 2):
    if 'L' in s[w]:
        print('No')
        exit()

print('Yes')

Solution (Python):
S=input()
N=len(S)
count=0
if N%2==0:
    for i in range(0,N//2):
        if S[2*i]=="L" or S[2*i+1]=="R":
            count=1
else:
    for i in range(0,N//2):
        if S[2*i]=="L" or S[2*i+1]=="R":
            count=1
    if S[N-1]=="L":
            count=1
if count==1:
    print("No")
else:
    print("Yes")