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):
a = input()
b = True
for i in range(len(a)):
    if i % 2 == 0:
        if a[i] == 'R' or a[i] == 'U' or a[i] == 'D':
            continue
        else:
            b = False
            break
    else:
        if a[i] == 'L' or a[i] == 'U' or a[i] == 'D':
            continue
        else:
            b = False
            break
if b:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()

for i, c in enumerate(S):
    if (i % 2 == 0 and c in 'RUD') or (i % 2 != 0 and c in 'LUD'):
        continue
    else:
        print('No')
        exit(0)
print('Yes')

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

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

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

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

Solution (Python):
S = input()

tf_list = []

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

if sum(tf_list) == 1 * len(S):
    print('Yes')
else:
    print('No')

Solution (Python):
N = input()

Nodd = N[0::2]
Neven = N[1::2]

if "L" in Nodd or "R" in Neven:
    print("No")
else:
    print("Yes")

Solution (Python):
s=list(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()
Flag = True
for i, ss in enumerate(S):
    if i % 2 == 0 and ss not in ['R', 'U', 'D']:
        Flag = False
        break
    if i % 2 != 0 and ss not in ['L', 'U', 'D']:
        Flag = False
        break

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

Solution (Python):


line = input()
tester = ""
for i, word in enumerate(line):
    if (i + 1) % 2 == 0:
        if word == "R":
            tester = "No"
            break
    else:
        if word == "L":
            tester = "No"
            break
if tester == "":
    tester = "Yes"
print(tester)

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):
S = input()
length = len(S)
ans = "Yes"
for i in range(length):
    if (i % 2 == 0 and S[i] == "L")or(i % 2 == 1 and S[i] == "R"):
        ans = "No"
        break

print(ans)

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

Solution (Python):


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

for i in s1:
    if i=="L":
        flg=1
for i in s2:
    if i=="R":
        flg=1
        
if flg==0:
    print("Yes")
else:
    print("No")

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

Solution (Python):
S = input()

A = 'RUD'
B = 'LUD'

for s in S[0::2]:
    if s not in A:
        print('No')
        exit()

for s in S[1::2]:
    if s not in B:
        print('No')
        exit()

print('Yes')

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    s_list = list(S)
    for i, s in enumerate(s_list):
        if i % 2 == 1:
            if s not in ['L', 'U', 'D']:
                print('No')
                return
        else:
            if s not in ['R', 'U', 'D']:
                print('No')
                return
    print('Yes')



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

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

for i in range(len):
    if i % 2 == 0:
        if S[i] == "R" or S[i] == "U" or S[i] == "D":
            continue
        else:
            flag = 1
    else:
        if S[i] == "L" or S[i] == "U" or S[i] == "D":
            continue
        else:
            flag = 1

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

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

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

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

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

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

print(ans)

Solution (Python):
s = input()
e = "RUD"
o = "LUD"
f = True

for i in range(0, len(s)):
	if s[i] not in (e if (i + 1) % 2 == 1 else o):
		f = False
		break

print("Yes" if f == True else "No")

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

bangou = 0
seikou = True
for moji in s:
    bangou += 1
    if bangou % 2 == 0:
        if moji in ["L", "U", "D"]:
            continue
        else:
            seikou = False
            break
    else:
        if moji in ["R", "U", "D"]:
            continue
        else:
            seikou = False
            break
if seikou:
    print("Yes")
else:
    print("No")

Solution (Python):
s = list(input())
a = s[::2]
b = s[1::2]
if a.count('L') == 0 and b.count('R') == 0:
  print('Yes')
else:
  print("No")

Solution (Python):
S = input()

cnt = 0

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

if cnt ==0:
    print('Yes')
if cnt !=0 :
    print("No")

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

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

Solution (Python):
s=input()

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

Solution (Python):
step = input()
a, b = ["R","U","D"], ["L","U","D"]

tmp1 = step[::2]
tmp2 = step[1::2]

if "L" in tmp1 or "R" in tmp2:
  print("No")
else:
  print("Yes")

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

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

Solution (Python):
S = input()

res = True

for i, s in enumerate(S):
    if (i+1)%2 == 1:
        if s not in "RUD":
            res = False
            break
    else:
        if s not in "LUD":
            res = False
            break

print(("No", "Yes")[res])

Solution (Python):
S=input()

odd=S[::2]
even=S[1::2] if len(S) > 2 else []

a = 'L' in odd
b = 'R' in even

if a or b:
  print('No')
else:
  print('Yes')

Solution (Python):
a = list(str(input()))
n = len(a)


count = 0
for i in range(0,n,2):
    if a[i] != "R" and  a[i] != "U" and a[i] != "D":
        count = 1
for i in range(1,n,2):
    if a[i] != "L" and  a[i] != "U" and a[i] != "D":
        count = 1
if count == 0:
    print("Yes")
else:
    print("No")

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

Solution (Python):
s = input()

flag = True

for i, x in enumerate(s):
    if x == "L":
        if i % 2 == 0:
            flag = False
            break
    elif x == "R":
        if i % 2 == 1:
            flag = False
            break

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

Solution (Python):
S=input()

flg=False
if len(set(S[::2]) - set(["R","D","U"])) == 0:
    if len(set(S[1:][::2]) - set(["L","U","D"])) ==0:
        flg=True

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

Solution (Python):
s=input()
n=len(s)
winFlag=True

for i,it in enumerate(s):
    if i%2==1:
        if not (it in "LUD") :
            winFlag=False
    else:
        if not (it in "RUD"):
            winFlag=False
if(winFlag==True):
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()
ans=1
for a,i in enumerate(s):
    if (a%2 and i=="R") or (a%2==0 and i=="L"):
        ans=0

print(["No","Yes"][ans])

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 sys
a = list(input())
for i in range(len(a)):
    if i%2 == 0:
        if a[i] == 'L':
            print('No')
            sys.exit()
    else:
        if a[i] == 'R':
            print('No')
            sys.exit()
print('Yes')

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

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

Solution (Python):
S = list(input())
count = 1
num = 0
for i in S:
  if count %2 == 1:
    if i == "R" or i == "U" or i == "D":
      num += 1
  else:
    if i == "L" or i == "U" or i == "D":
      num += 1
  count += 1
if num == len(S):
  print("Yes")
else:
  print("No")

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

flg = 0

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

Solution (Python):
s = input()

flg = 0

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

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

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

Solution (Python):
a=input()
cnt=0
e=["L","U","D"]
o=["R","U","D"]
for i in range(len(a)):
  if i%2==0:
    if a[i] in o:
      pass
    else:
      cnt+=1
      break
  else:
    if a[i] in e:
      pass
    else:
      cnt+=1
      break

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

Solution (Python):
s = input()

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

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

Solution (Python):

s = input()

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

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

Solution (Python):
S = input()

odd = 0
even = 0
for i, s in enumerate(S):
    if (i+1)%2 == 0:
        if s == 'L' or s == 'U' or s == 'D':
            odd += 1
    else:
        if s == 'R' or s == 'U' or s == 'D':
            even += 1
            
if odd + even == len(S):
    print('Yes')
else :
    print('No')

Solution (Python):
import sys

input = sys.stdin.readline


class AtCoder:
    def main(self):
        S = input().rstrip()
        odd = {'R', 'U', 'D'}
        even = {'L', 'U', 'D'}

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



if __name__ == '__main__':
    AtCoder().main()

Solution (Python):
if __name__ == '__main__':
    s = list(input())

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

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

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

Solution (Python):
S = input()

cnt = 1
for i in S:
    if cnt%2 == 0:
        if i == "L" or i == "U" or i == "D":
            pass
        else:
            print("No")
            exit()
    else:
        if i == "R" or i == "U" or i == "D":
            pass
        else:
            print("No")
            exit()
    cnt += 1

print("Yes")

Solution (Python):
s = list(input())
flg = True
for i in range(len(s)):
	if i % 2 == 0:
		if s[i] == "L":
			flg = False
			break
	else:
		if s[i] == "R":
			flg = False
			break

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

Solution (Python):
S = str(input())
ans = 'Yes'
for i, letter in enumerate(S):
  if i%2 == 0 and (letter == 'R' or letter == 'U' or letter == 'D'):
    continue
  elif i%2 == 1 and (letter == 'L' or letter == 'U' or letter == 'D'):
    continue
  else:
    ans = 'No'
print(ans)

Solution (Python):
s = input()
flag = True
for i, e in enumerate(s):
  if i%2==0 and e not in "RUD":
    flag = False
  elif i%2==1 and e not in "LUD":
    flag = False
if flag:
  print("Yes")
else:
  print("No")

Solution (Python):
S = input()
odd = ["R", "U", "D"]
even = ["L", "U", "D"]
i = 0
ans = "Yes"

for s in S:
    if i % 2 == 0:
        if s not in odd:
            ans = "No"
            break
    else:
        if s not in even:
            ans = "No"
            break
    i += 1

print(ans)

Solution (Python):
from itertools import cycle

o = cycle(['RUD', 'LUD'])
i = input()
u = []
for x, y in zip(o, i):
    if y in x:
        u.append(True)
    else:
        u.append(False)

print('Yes' if all(u) else 'No')

Solution (Python):


def f(S):
    for i, c in enumerate(S):
        if i%2 == 0:
            if c == 'L':
                return False
        elif c == 'R':
            return False
            
    return True


def main():
    S = input()

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


if __name__ == '__main__':
    main()

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

flag="Yes"
for i,step in enumerate(ls):
    idx=i+1
    if idx%2==1:
        if step=="L":
            flag="No"
            break
    else:
        if step=="R":
            flag="No"
            break
print(flag)

Solution (Python):
S = input()

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

print(ans)

Solution (Python):
N = input()

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

Solution (Python):
S = input()

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

print('Yes')

Solution (Python):
import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy




def main():
    ss = input()
    odd = ["R","U","D"]
    even = ["L","U","D"]
    for s in ss[::2]:
        if not s in odd:
            return False
    for s in ss[1::2]:
        if not s in even:
            return False
    return True

if __name__ == '__main__':
    if main():
        print("Yes")
    else:
        print("No")

Solution (Python):
s=input()
print('YNeos'[not (all(x in ['L','U','D'] for x in s[1::2]) and all(x in ['R','U','D'] for x in s[::2]))::2])

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

Solution (Python):


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

    for idx, str_ in enumerate(S):
        if idx % 2 != 0:
            if str_ in ["L", "U", "D"]:
                continue
            else:
                print("No")
                break
        else:
            if str_ in ["R", "U", "D"]:
                continue
            else:
                print("No")
                break
    else:
        print("Yes")

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

Solution (Python):
def f_b():
    s = input()
    e, o, a = "RUD", "LUD", "Yes"
    for i, si in enumerate(s):
        if i%2==0:
            if si not in e:
                a = "No"
                break
        elif i%2==1:
            if si not in o:
                a = "No"
                break

    print(a)

if __name__ == "__main__":
    f_b()

Solution (Python):
s = input()

for i, v in enumerate(s):
    if i % 2 == 1:
        if not v in 'LUD':
            print('No')
            break
    else:
        if not v in 'RUD':
            print('No')
            break
else:
    print('Yes')

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

isEasy = True

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

Solution (Python):
S = input()

odd_S = list(S)[::2]
even_S = list(S)[1::2]

if 'L' in odd_S or 'R' in even_S :
  print("No")
else:
  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 = input()

i = 1
flag = True
for s in S:
    if i % 2 == 1 and (s == 'R' or s == 'U' or s == 'D'):
        i += 1
        continue
    elif i % 2 == 0 and (s == 'L' or s == 'U' or s == 'D'):
        i+= 1
    else:
        flag = False
        break
if flag:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):


S = list(input())





ans='Yes'

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





print(str(ans))

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

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

Solution (Python):

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

Solution (Python):
s=input()

flag=1

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

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

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

if __name__ == "__main__":
    main()

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

i = 0
ans = 'Yes'
for x in S:
    if i == 0:
        if x not in ['R','U','D']:
            ans = 'No'
            break
        i += 1
    else:
        if x not in ['L','U','D']:
            ans = 'No'
            break
        i -= 1

print(ans)

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

Solution (Python):
a=list(input())
kisu=[]
gusu=[]
for i in range(len(a)):
    if i%2==0:
        kisu.append(a[i])
    else:
        gusu.append(a[i])



if "L" in kisu or "R" in gusu:
    print("No")
else:
    print("Yes")

Solution (Python):
S = input()

flg = 0
for i in range(len(S)):
    if i%2==0:
        if S[i]!='R' and S[i]!='U' and S[i]!='D':
            flg=1
    else:
        if S[i]!='L' and S[i]!='U' and S[i]!='D':
            flg=1

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

Solution (Python):
import sys

s = input()

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

Solution (Python):
s = input()

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

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

for i in range(len(s)):
    c = s[i]
    if i % 2 != 0:
        if c != 'L' and c != 'U' and c != 'D':
            ans = False
    else:
        if c != 'R' and c != 'U' and c != 'D':
            ans = False

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

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

for i in S[::2]:
	if not(i=="R" or i=="U" or i=="D"):
		print("No")
		sys.exit()

for i in S[1::2]:
	if not(i=="L" or i=="U" or i=="D"):
		print("No")
		sys.exit()
	
print("Yes")

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

Solution (Python):
s = 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()
Flag=True

for i in S[1:100:2]:
  if i=="L" or i=="U" or i=="D":
    pass
  else:
    Flag=False
    
for j in S[0:100:2]:
  if j=="R" or j=="U" or j=="D":
    pass
  else:
    Flag=False

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

Solution (Python):
s = input()

k = 0
for i,a in enumerate(s):
    j = i+1
    if j%2 == 0 and a == "R":
        k += 1
        break
    elif j%2 == 1 and a == "L":
        k += 1
        break

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

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    S = str(input().strip())

    for i, s in enumerate(S, start=1):
        if i%2 == 1:
            if s not in ('R', 'U', 'D'):
                return 'No'
        else:
            if s not in ('L', 'U', 'D'):
                return 'No'

    return 'Yes'


if __name__ == '__main__':
    print(main())

Solution (Python):
S = input()

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

Solution (Python):
S = input()
if "L" not in S[::2]:
    if "R" not in S[1::2]:
        print("Yes")
        exit()
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):
s = input()
for i, j in enumerate(s):
    if i % 2 == 0 and j == 'L':
        print('No')
        break
    elif i % 2 == 1 and j == 'R':
        print('No')
        break
else:
    print('Yes')

Solution (Python):
S=input()

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

Solution (Python):
S = input()

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

Solution (Python):
S = input()

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

print('Yes')

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

Solution (Python):
S = input()

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

Solution (Python):

S = input()

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

Solution (Python):
S = input()

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

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

Solution (Python):

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

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

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

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

Solution (Python):





S = input()
a = all([s in "RUD" for i, s in enumerate(S) if i % 2 == 0])
b = all([s in "LUD" for i, s in enumerate(S) if i % 2 == 1])
if a and b:
  print("Yes")
else:
  print("No")

Solution (Python):
s = list(str(input()))
l1 = ["R", "U", "D"]
l2 = ["L", "U", "D"]

ans = "Yes"
for i, c in enumerate(s):
    if i % 2 == 0 and c not in l1:
        ans = "No"
    elif i % 2 == 1 and c not in l2:
        ans = "No"
print(ans)

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

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

Solution (Python):
S = input()

odd_letter = {'R', 'U', 'D'}
even_letter = {'L', 'U', 'D'}
odds = S[0::2]
evens = S[1::2]

if set(odds) <= odd_letter and set(evens) <= even_letter:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()

n = len(s)

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

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

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

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

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