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):
N = input()
for i in range(len(N)):
        if (i%2 == 0) & (N[i] == "L"):
                print("No")
                exit()
        elif (i%2 == 1) & (N[i] == "R"):
                print("No")
                exit()
print("Yes")

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:
    print("No")
    exit()
elif 'R' in even:
    print("No")
    exit()
print("Yes")

Solution (Python):
s = input()

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

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

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

Solution (Python):
S = input()

odd  = set(c for i, c in enumerate(S) if i % 2 == 0)
even = set(c for i, c in enumerate(S) if i % 2 == 1)

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

Solution (Python):
import sys

S = input()

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

print("Yes")

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

Solution (Python):


import math
import sys


DEBUG = False


def inp():
    return sys.stdin.readline().rstrip()


def dprint(*value, sep=' ', end='\n'):
    if DEBUG:
        print(*value, sep=sep, end=end)


def main():
    S = input()

    odd = set(['R', 'U', 'D'])
    even = set(['L', 'U', 'D'])

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

    print(ans)


if __name__ == '__main__':
    main()

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

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

for i, s in enumerate(S):
    if i % 2 == 0 and s not in odd:
        print("No")
        break
    if i % 2 == 1 and s not in even:
        print("No")
        break
else:
    print("Yes")

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

n=len(s)
judge=True
for i in range(n):
    if not s[i]=="D" or s[i]=="U":

        if not i%2==1 and s[i]=="L":
            judge=False
            break
        else:
            if not i%2==0 and s[i]=="R":
                judge=False
                break
if judge==True:
    print("Yes")
else:
    print("No")

Solution (Python):
def solve():
    music_score = input()
    for note in music_score[0::2]:  
        if note == 'L':
            print('No')
            return
    for note in music_score[1::2]:   
        if note == 'R':
            print('No')
            return
    print('Yes')

solve()

Solution (Python):
def get_answer(input_list):
    d = input_list[0]
    f1 = True
    f2 = True
    for i in range(len(d)):
        s = d[i]
        if (i + 1) % 2 == 1:
            if s not in ["R","U","D"]:
                f1 = False
        else:
            if s not in ["L","U","D"]:
                f2 = False

    if f1 and f2:
        return "Yes"
    return "No"



if __name__ == "__main__":
    input_list = []
    while True:
        try:
            input1 = input()
            if not input1:
                break
            if len(input1) == 0:
                break
            input_list.append(input1)
        except EOFError:
            break
    print(get_answer(input_list))

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

Solution (Python):
S=list(str(input()))
judge=True
for i, name in enumerate(S):
    if S[i]=="R" and i%2==0:
        continue
    elif S[i]=="L" and i%2!=0:
        continue
    elif S[i]=="U"or S[i]=="D":
        continue
    else:
        print("No")
        judge=False
        break
if judge==True:
    print("Yes")

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

c = 0
f = True

for i in s:
  c += 1
  if c % 2 != 0:
    if i == 'L':
      f = False
      break
  else:
    if i == 'R':
      f = False
      break

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

Solution (Python):
s = input()

if all(w in ('R', 'U', 'D') for w in s[::2]) and \
        all(w in ('L', 'U', 'D') for w in s[1::2]):
    print("Yes")
else:
    print("No")

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

Solution (Python):
s = input()

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

print('Yes')

Solution (Python):
S = input()

counter = 1
yorn = 1
for foot in S:
    if foot == 'R':
        if counter % 2 == 0:
            yorn=0
            break
    elif foot == 'L':
        if counter % 2 == 1:
            yorn = 0
            break
    counter+=1

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

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

Solution (Python):
import re

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

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

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


if __name__ == '__main__':
  main()

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

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

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

ans = "Yes"

for i in range(N):
    if (i+1) % 2:
        if S[i] in odd:
            pass
        else:
            ans = "No"
            break
    else:
        if S[i] in even:
            pass
        else:
            ans = "No"
            break

print(ans)

Solution (Python):

sarr = input()
kisuu = ['R', 'U', 'D']
gusuu = ['L', 'U', 'D']

is_fumiyasui = True
for i, s in enumerate(sarr):
  if (i+1) % 2 == 0:
    if s not in gusuu:
      is_fumiyasui = False
      break
  else:
    if s not in kisuu:
      is_fumiyasui = False
      break


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

Solution (Python):
S=input()
if all(c in 'RUD' for c in S[::2]) and all(c in 'LUD' for c in S[1::2]):
  print('Yes')
else:
  print('No')

Solution (Python):
def check(arr, c):
  for each in arr:
    if each == c or each == "U" or each == "D":
      pass
    else:
      return False
  return True

steps = input()
odds = steps[::2]
evens = steps[1::2]
if check(odds, "R") and check(evens, "L"):
  print("Yes")
else:
  print("No")

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

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

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

Solution (Python):
import sys

s = input()

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

Solution (Python):
import numpy as np

S = input()
 
S = np.array( [S[i] for i in range(len(S))] )
 
if (S[0::2]=='L').any():
  print('No')
elif (S[1::2]=='R').any():
  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"
    else:
        if s[i] == 'R':
            ans = "No"

print(ans)

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

Solution (Python):
s = input()
i = 0
ans = 'Yes'

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

print(ans)

Solution (Python):
n = input()
en=len(n)//2
evn=[]
odn=[]
for i in range(len(n)):
    if i%2==0 and n[i] == "L":
        print("No")
        exit()
    if i%2>0 and n[i] == "R":
        print("No")
        exit()
print("Yes")

Solution (Python):
S = input()
out = "Yes"
for i, char in enumerate(S):
    if (i + 1) % 2 == 0 and char != "L" and char != "U" and char != "D":
        out = "No"
        break
    elif (i + 1) % 2 == 1 and char != "R" and char != "U" and char != "D":
        out = "No"
        break
print(out)

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):
table=[{'L':False, 'R':True, 'U':True, 'D':True,},
       {'L':True, 'R':False, 'U':True, 'D':True,}]
S=input()
if all([table[i%2][c] for i, c in enumerate(S)]):
    print('Yes')
else:
    print('No')

Solution (Python):
import re

S = input()
p = re.compile(r'^([^L][^R])*[^L]?$')
if p.match(S):
    print("Yes")
else:
    print("No")

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

for i in range (0,int(len(s)),2):
  if s[i] not in odd:
    print("No")
    exit()
    
for i in range (1, int(len(s)), 2):
  if s[i] not in even:
    print("No")
    exit()  

print("Yes")

Solution (Python):
def check(*a_list):
    count = 0
    for i in a_list:
        if count % 2 == 0:  
            if i == "L":
                return "No"
        else:  
            if i == "R":
                return "No"
        count += 1
    return "Yes"

S = input()
print(check(*S))

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

Solution (Python):
S=input()
Flag=True
for i, c in enumerate(S):
    if i%2==0 and c=='L': 
        Flag=False
        continue
    if i%2==1 and c=='R': 
        Flag=False
        continue
if Flag:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()

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

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

for i in range(N):
    if i % 2 == 0:
        if S[i] == 'L':
            print('No')
            exit()

    else:
        if S[i] == 'R':
            print('No')
            exit()

print('Yes')

Solution (Python):
S = input()
if all(c in 'RUD' for c in S[::2]) and all(c in 'LUD' for c in S[1::2]):
  print('Yes')
else:
  print('No')

Solution (Python):
a=input().strip()
t=1
for i in range(len(a)):
  if i%2==0 and a[i] not in ['R','U','D']:
    t=0
    break
  elif i%2!=0 and a[i] not in ['L','U','D']:
    t=0
    break
if t==1:
  print('Yes')
else:
  print('No')

Solution (Python):
import sys
from collections import defaultdict
from heapq import *
sys.setrecursionlimit(200000)
input = sys.stdin.readline




S = input().strip()

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

print("Yes")

Solution (Python):
s = input()
a =[]
b =[]

for i in range(len(s)):
  if i%2==0:
    a.append(s[i])
  else:
    b.append(s[i])
if 'R' in b or 'L' in a:
  print('No')
else:
  print('Yes')

Solution (Python):
s = input()

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

for i, c in enumerate(s):
    if i & 1 == 0 and c not in odd:
        print('No')
        exit()
    if i & 1 == 1 and c not in even:
        print('No')
        exit()
print('Yes')

Solution (Python):
s = input()

flg = True
for index, char in enumerate(s):
    if index % 2 == 0:
        if char == 'L':
            flg = False
            break
    else:
        if char == 'R':
            flg = False
            break
    
if flg:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

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

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

Solution (Python):
str = input()
num = len(str)
ans = True
for i in range(num):
    if (i+1) % 2 == 0:
        if str[i] == "R":
            ans = False
    else:
        if str[i] == "L":
            ans = False

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

Solution (Python):


S = input()
ans = "Yes"
i=1
for c in S:
    if((i % 2 == 0 and c == "R") or (i % 2 == 1 and c == "L")):
        ans = "No"
        break
    i+=1
print(ans)

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

Solution (Python):
import sys

stdin = sys.stdin

sn = lambda : stdin.readline().rstrip()
an = lambda : map(int, stdin.readline().split())
ni = lambda : int(sn())

s = sn()

odd = s[::2]
even = s[1::2]
ans = "Yes"
for o in odd:
  if o not in ("R", "U", "D"):
    ans = "No"
for e in even:
  if e not in ("L", "U", "D"):
    ans = "No"
print(ans)

Solution (Python):
S = input()

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

Solution (Python):
S = input()
count = 1
result = "Yes"
for c in S:
  if count % 2 != 0:
    if c == "L":
      result = "No"
  else:
    if c == "R":
      result = "No"
  count += 1

print(result)

Solution (Python):
S = list(input())
if False not in [i not in "L" for i in S[::2]] and False not in [i not in "R"for i in S[1::2]]:
	print("Yes")
else:
	print("No")

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

f=0

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

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

for c in s:
  if (odd and c == 'L') or (not odd and c == 'R'):
    flag = False
    break
  odd = not odd
  
if flag:
  print('Yes')
else:
  print('No')

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

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

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

Solution (Python):
s = input()

gu = ""
ki = ""
for n, i in enumerate(s):
    if n % 2 == 0:
        gu = gu + i
    else:
        ki = ki + i


for i in gu:
    if i not in ["R", "U", "D"]:
        print("No")
        exit()

for i in ki:
    if i not in ["L", "U", "D"]:
        print("No")
        exit()

print("Yes")

Solution (Python):


def main():
    s = input()
    print('Yes' if is_easy_to_step(s) else 'No')


def is_easy_to_step(strs):
    for i, s in enumerate(strs):
        if i % 2 != 0 and (s == 'L' or s == 'U' or s == 'D'):
            continue
        elif i % 2 == 0 and (s == 'R' or s == 'U' or s == 'D'):
            continue
        else:
            return False

    return True


if __name__ == '__main__':
    main()

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())

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

main()

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

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

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

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

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

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

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

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

Solution (Python):
s = input()

length = len(s)

if len(s) ==1:
    flag1, flag2= True, True
else:
    flag1, flag2= False, False

odds = "RUD"
evens ="LUD"

for x in range (0,len(s),2):
    if s[x] in odds:
        flag1 = True        
    else:
        flag1= False
        break
        

for x in range (1,len(s),2):
    if s[x] in evens:
        flag2 = True
    else:
        flag2 = False
        break

if flag1 ==True and flag2 == True:
    print ("Yes")
else:
    print ("No")

Solution (Python):
S = input()

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

print('Yes')

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

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

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

Solution (Python):
s = input()
odd = s[::2].replace("R","").replace("U","").replace("D","")
even = s[1::2].replace("L","").replace("U","").replace("D","")
if len(odd)==0 and len(even)==0:
  print("Yes")
else:
  print("No")

Solution (Python):
S= list(input())
a=[]
for i in range(0,len(S)):
  if i%2==0:
    if S[i]=="R" or S[i] == "U" or S[i]=="D":
      a.append(1)
  elif i%2!=0:
    if S[i]=="L" or S[i]=="U" or S[i]=="D":
      a.append(1)
if len(S)==sum(a):
  print("Yes")
else:
  print("No")

Solution (Python):
import sys

S=sys.stdin.readline().rstrip()
if ("L" in S[0::2] or "R" in S[1::2]):
  print('No')
else:
  print('Yes')

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

Solution (Python):
def solve(s):
    for i, c in enumerate(s):
        if i % 2 == 1:
            if not c in ["L", "U", "D"]:
                return "No"
        else:
            if not c in ["R", "U", "D"]:
                return "No"
    return "Yes"

s = input()
print(solve(s))

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

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

print(flag)

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

Solution (Python):
S = input()

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

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

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

for index,value in enumerate(s):
  if index%2==0:
    if value!="R" and value!="U" and value!="D":
      print("No")
      exit()
  else:
    if value!="L" and value!="U" and value!="D":
      print("No")
      exit()

print("Yes")

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

Solution (Python):
justified=True
S=list(input())
check1=["R","U","D"]
check2=["L","U","D"]
for j in range(len(S)):
    if( j)%2==0:
        if  S[j] in check1:
            continue
        else:
            justified=False
            break
        
    if (j)%2==1:
        if S[j] in check2:
            continue
        else:
            justified=False
            break
if justified:
    print("Yes")
else:
    print("No")

Solution (Python):
arg = input()

isOk = True

for i in range(len(arg)):
    
    if i % 2 == 0:

        if arg[i] == 'L':
            isOk = False
    else:
        if arg[i] == 'R':
            isOk = False

msg = ''

if (isOk):
    msg = 'Yes'
else:
    msg = 'No'

print(msg)

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

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

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

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

Solution (Python):



S = list(input())
Odd = set([S[i] for i in range(len(S)) if i % 2 == 0])
Even = set([S[i] for i in range(len(S)) if i % 2 != 0])
if 'L' in Odd or 'R' in Even:
    print('No')
else:
    print('Yes')

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

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

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

if 'L' in a or 'R' in b:
  print('No')

else:
  print('Yes')

Solution (Python):
s=input();print("YNeos"["L"in s[::2]or"R"in s[1::2]::2])

Solution (Python):
s=[i for i in input()]
s1=s[::2]
s2=s[1::2]
for i in s1:
    if i=='L':
        print('No')
        exit()
for i in s2:
    if i=='R':
        print('No')
        exit()
print('Yes')

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

Solution (Python):
while True:
	try:
		D = list(input())
		isPlayable = True
		for i in range(0, len(D), 2):
			if D[i] == 'L':
				isPlayable = False
				break
		if isPlayable:
			for i in range(1, len(D), 2):
				if D[i] == 'R':
					isPlayable = False
					break
		if isPlayable:
			print("Yes")
		else:
			print("No")
	except:
		break

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

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

for i, j in enumerate(s):
    if i % 2 == 0:
        if j not in even:
            print('No')
            break
    else:
        if j not in odd:
            print('No')
            break
else:
    print('Yes')

Solution (Python):
def check(S, even, odd):
  for i,c in enumerate(S):
    if i % 2 == 0:
      if not c in even:
        return "No"
    else:
      if not c in odd:
        return "No"
  return "Yes"

S = input()
even = ["R", "U", "D"] 
odd = ["L", "U", "D"]
print(check(S, even, odd))

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

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

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

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

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

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

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

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

Solution (Python):



def isGoodTap(s):
    for i, x in enumerate(s):
        if i%2:
            if x == 'R': return False
        else:
            if x == 'L': return False
    return True

def main():
    s = input()
    if isGoodTap(s): print("Yes")
    else: print("No")

if __name__ == '__main__':
    main()

Solution (Python):
import sys
pos=input()
N=len(pos)
flag=False
for i in range(0,N):
    if i %2==0:
        if not(pos[i]=='R' or pos[i]=='U' or pos[i]=='D'):
            flag=True
            break
    elif not(pos[i]=='L' or pos[i]=='U' or pos[i]=='D'):
        flag=True
        break

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

Solution (Python):
S = input()
m = "Yes"
for i, t in enumerate(S):
    if i%2 == 0 and t == 'L' or i%2 == 1 and t == 'R':
        m = "No"
        break
print(m)

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

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

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

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

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

Solution (Python):
S = input()

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

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

Solution (Python):
S = input()

So = S[::2]
Se = S[1::2]

if 'L' in So or 'R' in Se:
  print('No')
else:
  print('Yes')