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

Solution (Python):
s = list(input())
ans = 'Yes'
for i in range(len(s)):
    if i%2!=0 and not(s[i]=='L' or s[i]=='U'or s[i]=='D'):
        ans = 'No'
    elif i%2==0 and not(s[i]=='R' or s[i]=='U'or s[i]=='D'):
        ans = 'No'

print(ans)

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

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

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

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

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

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

i=0
while i<l:
  if i%2!=0:
    if s[i]=='R':
      print('No')
      exit()
  else:
    if s[i]=='L':
      print('No')
      exit()
      
    
  i=i+1        
print('Yes')

Solution (Python):
s=input()
k=set(s[::2])
g=set(s[1::2])
for i in k:
    if i not in 'RUD':
        print('No')
        exit(0)
for j in g:
    if j not in 'LUD':
        print('No')
        break
else:
    print('Yes')

Solution (Python):
s = input()
f = 0
s_k = s[0::2]
s_g = s[1::2]

for i in range(len(s_k)):
    if s_k[i] in ['R','U','D']:
        pass
    else:
        f = 1
        break
    
for j in range(len(s_g)):
    if s_g[j] in ['L','U','D']:
        pass
    else:
        f = 2
        break
        
if f == 1 and f == 2 or f == 0:
    print('Yes')
else:
    print('No')

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

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

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

for j in range(1, len(s), 2):
    if s[j] == "R":
        ans = "No"
        break
    
print(ans)

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

for j in range(1, len(s), 2):
    if s[j] == "R":
        ans = "No"

print(ans)

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

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

Solution (Python):
import sys
S=input()
n=len(S)
if n>1:
    for i in range(n//2):
        s=S[2*i]
        if s=="L":
            print("No")
            sys.exit()
        s=S[2*i+1]
        if s=="R":
            print("No")
            sys.exit()
if n%2==1:
    s=S[-1]
    if s=="L":
        print("No")
        sys.exit()
print("Yes")

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

Solution (Python):

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

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

res = "Yes"
for i in range(N):
  if (i+1) % 2 == 1:
    if S[i] == "L":
      res = "No"
  else:
    if S[i] == "R":
      res = "No"

print(res)

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

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

Solution (Python):
s = input()

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

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

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



def main():
    S = input().strip()

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

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

    ans_flag = True
    for x in even:
        if x not in e:
            ans_flag = False

    for x in odd:
        if x not in o:
            ans_flag = False

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


if __name__ == "__main__":
    main()

Solution (Python):
od ="RUD"
ev="LUD"
res = "Yes"
s = raw_input()
for i in xrange(len(s)):
    if i%2 ==0 :
        if s[i] not in od:
            res = "No"
            break
    else:
        if s[i] not in ev:
            res = "No"
            break
print res

Solution (Python):
s = input()
if len(set(s[::2])-{"R","U","D"}) ==0 and len(set(s[1::2])-{"L","U","D"}) ==0 :
    print('Yes')
else:
  print('No')

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

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

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

Solution (Python):
s = input()
s_eve = [i for i in s[::2]]
s_odd = [i for i in s[1::2]]

if 'L' not in s_eve and 'R' not in s_odd:
    print('Yes')
else:
    print('No')

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

Solution (Python):
S=input()
ans="Yes"
for i in range(0,len(S),2):
    if S[i]!="R" and S[i]!="U" and S[i]!="D":
        ans="No"
for j in range(1,len(S),2):
    if S[j]!="L" and S[j]!="U" and S[j]!="D":
        ans="No"
print(ans)

Solution (Python):


s_l = input()
num = 0
for i, s in enumerate(s_l):
    num = i +1
    if num % 2 == 0:
        if s_l[i] == 'R':
            print('No')
            exit()
    else:
        if s_l[i] == 'L':
            print('No')
            exit()
print('Yes')

Solution (Python):


S = str(input())
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 s[i] == 'L':
            print('No')
            exit()
    else:
        if s[i] == 'R':
            print('No')
            exit()

print('Yes')

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

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

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

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

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

Solution (Python):

import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    s = ns()
    for i, si in enumerate(s):
        if i % 2 == 0:
            if si in ("R", "U", "D"):
                continue
            else:
                print("No")
                quit()
        else:
            if si in ("L", "U", "D"):
                continue
            else:
                print("No")
                quit()
    print("Yes")

if __name__ == "__main__":
    main()

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

if set(S[::2]) <= set(["R", "U", "D"]) and set(S[1::2]) <= set(["L","U","D"]):
    print("Yes")
else:
    print("No")

Solution (Python):
import sys

S = input().encode("ASCII")

for i in range(0, len(S), 1):
	if (i & 1 == 0 and S[i] == 76) or (i & 1 == 1 and S[i] == 82):
		print("No")
		sys.exit(0)

print("Yes")

Solution (Python):
s = input()

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

Solution (Python):




S = input()
S_list = []
S_list = list(S)
counter = 0

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

Solution (Python):
s=input()
for i in s[::2]:
    if i=="L":
        print("No")
        quit()
for i in s[1::2]:
    if i=="R":
        print("No")
        quit()
print("Yes")

Solution (Python):

S = list(input())

N=len(S)
flag=0
for i in range(N):

    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()
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']
for i in range(len(s)):
    if i%2 == 0:
        if s[i] not in odd:
            print('No')
            exit()
    else:
        if s[i] not in even:
            print('No')
            exit()
print('Yes')

Solution (Python):
import re
s = input()
print("Yes" if re.fullmatch("[RUD]*", s[::2]) and re.fullmatch("[LUD]*", s[1::2]) else "No")

Solution (Python):
s = input()

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

Solution (Python):
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

S = input()
if all(c != 'R' for c in S[1::2]) and all(c != 'L' for c in S[::2]):
    print('Yes')
else:
    print('No')

Solution (Python):
s = list(input())
i = 0
for s_ in s:
    i += 1
    if i % 2 == 1:
        if not (s_ == "R" or s_ == "U" or s_ == "D"):
            print("No")
            exit()
    else:
        if not(s_ == "L" or s_ == "U" or s_ == "D"):
            print("No")
            exit()
print("Yes")

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

Solution (Python):
S = input()
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']
for i,s in enumerate(S):
  if i%2!=0 and s not in even or i%2==0 and s not in odd:
    print('No')
    exit()
print('Yes')

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

Solution (Python):
S = [i for i in input()]
cnt = 0

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

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

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

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

print(solve())

Solution (Python):









s = input()

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

print(ans)

Solution (Python):
s=list(input())
ans="No"
odd=["R","U","D"]
even=["L","U","D"]
ODD=s[0::2]
EVEN=s[1::2]
if len(set(odd+ODD))==3 and len(set(even+EVEN))==3:
  ans="Yes"
print(ans)

Solution (Python):
"""
 SpeedForces
 Ah shit here we go again

"""

from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


def solve():
    s = input()
    id = 1
    valid = ['R']
    for i in s:
      if((id&1 and(i=='L')) or (id%2==0 and i=='R')):
        print("No")
        break
      id+=1
    else:
      print("Yes")





    return
















def main():
    
        solve()

BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()
pr = print
if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")
ll = lambda : list(map(int,input().split()))
vv = lambda :map(int,input().split())


if __name__ == "__main__":
    main()

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

if set(S[::2]) <= set(["R", "U", "D"]) and set(S[1::2]) <= set(["L","U","D"]):
    print("Yes")
else:
    print("No")

Solution (Python):
S=input()
ans='Yes'
O=''
E=''

for i in range(len(S)):
    if i%2==0:
        O+=S[i]
    else:
        E+=S[i]

if 'L' in O:
    ans='No'

if 'R' in E:
    ans='No'

print(ans)

Solution (Python):
s = input()
a = 0
for i in range(0, len(s), 2):
    if s[i] in ['R', 'U', 'D']:
        a += 1
for i in range(1, len(s), 2):
    if s[i] in ['L', 'U', 'D']:
        a += 1

print('Yes' if a == len(s) else 'No')

Solution (Python):
s = list(input())
n = len(s)
ok = True
for i in range(n):
    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 = list(input())
flag = 0
for i in range(len(s)):
    if i%2 == 0:
        if s[i] not in ['R', 'U', 'D']:
            flag = 1
    else:
        if s[i] not in ['L', 'U', 'D']:
            flag = 1
if flag == 1:
    print('No')
else:
    print('Yes')

Solution (Python):
import re

S = input()

m1 = re.fullmatch(r"[RUD]*", S[::2])
m2 = re.fullmatch(r"[LUD]*", S[1::2])
if m1 and m2:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

check = 0

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

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

Solution (Python):
import sys
S= input()
x = len(S)
odd = ['R','U','D']
even = ['L','U','D']
for i in range(x):
  if i%2 == 0:
    if S[i] not in odd:
      print('No')
      sys.exit()
  else:
    if S[i] not in even:
      print('No')
      sys.exit()
print('Yes')

Solution (Python):
S = input()

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

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

Solution (Python):
s=input()

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

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

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

Solution (Python):

k = { 'R', 'U', 'D' }
g = { 'L', 'U', 'D' }
s = input()
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] in k:
            continue
        else:
            print('No')
            exit()
    else:
        if s[i] in g:
            continue
        else:
            print('No')
            exit()
print('Yes')

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

Solution (Python):
s=input()
print('YNeos'[sum(1 for c in s[::2] if c in 'RUD')+sum(1 for c in s[1::2] if c in 'LUD')<len(s)::2])

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

Solution (Python):
text = input()
s = list(text)
n = len(text)

i = 0


while i < n:
    if i % 2 == 0:
        if s[i] == "R" or s[i] == "U" or s[i] == "D":
            i += 1

        else:
            print("No")
            break


    elif i % 2 == 1:
        if s[i] == "L" or s[i] == "U" or s[i] == "D":
            i += 1
        else:
            print("No")
            break

if i == n:
    print("Yes")
else:
    None

Solution (Python):
ans="Yes"
s=input()
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):
def main():
    s = list(input())
    for i, ss in enumerate(s):
        if (i%2 == 0 and ss == 'L') or (i%2 == 1 and ss == 'R'):
            print('No')
            return

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

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

print('Yes')

Solution (Python):
S = input()
is_odd = True
is_ng = False
for c in S:
    if is_odd:
        if c == 'L':
            is_ng = True
            break
        is_odd = not is_odd
    else:
        if c == 'R':
            is_ng = True
            break
        is_odd = not is_odd
print('YNeos'[is_ng::2])

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"
  else:
    if S[i] != "R" and S[i] != "U" and S[i] != "D":
      ans ="No"
print(ans)

Solution (Python):
ss = input()

even, odd = [], []

for i, s in enumerate(ss):
    if i%2==1:
        even.append(s)
    else:
        odd.append(s)

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

else:
    print('Yes')

Solution (Python):
ss = input()

even, odd = [], []

for i, s in enumerate(ss):
    if i%2==1:
        even.append(s)
    else:
        odd.append(s)

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

else:
    print('Yes')

Solution (Python):
S = input()
ans = 0
for i,word in enumerate(S,1):
    if int(i)%2==0:
        if word == "L" or word == "U" or word == "D":
            ans += 1
        else:
            pass
    else:
        if word == "R" or word == "U" or word == "D":
            ans += 1
        else:
            pass
if ans == len(S):
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
for i in range(len(S)):
    if (i + 1) % 2 == 1 :
        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):
S = input()
odd_flag = True
even_flag = True

for i, s in enumerate(S):
    if i % 2 == 0 and s == "L":
        odd_flag = False
    elif i % 2 == 1 and s  == "R":
        even_flag = False
if odd_flag and even_flag:
    print("Yes")
else:
    print("No")

Solution (Python):
import numpy as np
S = input()
count = True
for i in np.arange(0, len(S), 2):
    if S[i] == "L":
        count = False
        
for i in np.arange(1, len(S), 2):
    if S[i] == "R":
        count = False

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

Solution (Python):
import numpy as np
S = input()
count = 0
for i in np.arange(0, len(S), 2):
    if S[i] == "L":
        count += 1
        
for i in np.arange(1, len(S), 2):
    if S[i] == "R":
        count += 1

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

Solution (Python):
S = input()

s_1 = S[0::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()
t = 0
for i in range(len(s)):
    if (i+1)%2==1:
        if s[i] in ['R','U','D']:
            continue
        else:
            t = 1
            break
    else:
        if s[i] in ['L','U','D']:
            continue
        else:
            t = 1
            break
if t==1:
    print('No')
else:
    print('Yes')

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

Solution (Python):
s = list(input())
out = "No"
R = []
L = []
for k,i in enumerate(s):
  if (k%2) == 0:
    R.append(i)
  else:
    L.append(i)

if ("R" in L) or ("L" in R):
  pass
else:
  out = "Yes"
print(out)

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

Solution (Python):
s = input()

b = True

for i, j in enumerate(s):
    if i % 2 == 0:
        if j == 'L':
            b = False
            break
    else:
        if j == 'R':
            b = False
            break

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

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

Solution (Python):
s = input()
odd = "RUD"  
even = "LUD"
frag = True
for i in range(len(s)): 
    if i%2 == 0 and s[i] not in odd:
        frag = False
        break 
    elif i%2 != 0 and s[i] not in even:
        frag = False

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

Solution (Python):
import sys
import math


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

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

Solution (Python):
S = input()
odd = set(["R","U","D"])
even = set(["L","U","D"])
ok = True
for s in S[::2]:
    if s not in odd:
        ok = False
if len(S) > 1:
    for s in S[1::2]:
        if s not in even:
            ok = False
print("Yes" if ok else "No")

Solution (Python):
from sys import stdin

s = [x for x in stdin.readline().rstrip()]

ans = "Yes"

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

Solution (Python):
from sys import stdin

s = [x for x in stdin.readline().rstrip()]

odd = []
even = []

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

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

Solution (Python):
def resolve():
    S = input()
    odd_flag = True

    for s in S:
        if odd_flag:
            if not (s == 'R' or s == 'U' or s == 'D'):
                print('No')
                return
        else:
            if not (s == 'L' or s == 'U' or s == 'D'):
                print('No')
                return
        odd_flag = not(odd_flag)

    print('Yes')

if __name__ == "__main__":
    resolve()

Solution (Python):
S = input()
index = 0
for n in S:
  if index % 2 == 0:
    if n == "R" or n == "U" or n == "D":
      pass
    else:
      print("No")
      exit()
  else:
    if n == "L" or n == "U" or n == "D":
      pass
    else:
      print("No")
      exit()
  index += 1
print("Yes")

Solution (Python):
s = input()

odd = s[::2]


even = s[1::2]


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

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

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

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

Solution (Python):
import sys

s = input()

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

print("Yes")

Solution (Python):
s = list(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):
import sys







def main():
    S = input()

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

    easy = True
    for i, s in enumerate(S):
        if i %2 == 1:
            if s not in even:
                easy = False
        else:
            if s not in odd:
                easy = False

    print(['No', 'Yes'][easy])


if __name__ == '__main__':
    main()

Solution (Python):
s = input()
def ki(tap):
    for i in range(0,len(tap),2):
        if tap[i]=='L':
            return 'No'

def gu(tap):
    for i in range(1,len(tap),2):
        if tap[i]=='R':
            return 'No'

if ki(s)=='No' or gu(s)=='No':
    print('No')
else:
    print('Yes')

Solution (Python):
import sys
s = list(input())
x = []
y = []
for i in range(len(s)):
    if s[i] == "L" or s[i] == "R":
        if i%2 != 0:
            y.append(s[i])
        else:
            x.append(s[i])
if x.count("R") != len(x):
    print("No")
    sys.exit()
if y.count("L") != len(y):
    print("No")
    sys.exit()
print("Yes")

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

odd = s[::2]
even = s[1::2]
ans = "Yes"

if "L" in odd or "R" in even:
    ans = "No"

print(ans)

Solution (Python):





import sys

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

def main():
    s = input()
    l = len(s)
    flag = True

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

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

if __name__ == '__main__':
    main()

Solution (Python):
S = input()

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