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

Solution (Python):
s = input()

is_yes = True
for i in range(len(s)):
    if (i+1)%2 == 0 and s[i] == "R":
        is_yes = False
        break

    if (i+1)%2 == 1 and s[i] == "L":
        is_yes = False
        break

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

Solution (Python):
import sys

s = input()
odd = ["R", "U", "D"]
even = ["L", "U", "D"]

for i in range(len(s)):
    if (i % 2 == 0 and s[i] not in odd) or (i % 2 == 1 and s[i] not in even):
        print("No")
        sys.exit()
print("Yes")

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

a = S[0::2]
b = S[1::2]

if a.count('L') == 0 and b.count('R') == 0:
    print('Yes')
else:
    print('No')

Solution (Python):


S = input()
is_ok = True
for i, ch in enumerate(list(S)):
    if i % 2 == 0:
        if ch not in "RUD":
            is_ok = False
    else:
        if ch not in "LUD":
            is_ok = False

ans = "Yes" if is_ok else "No"

print(ans)

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

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    s = input().strip()
    print(
        "Yes"
        if all([c in ("R", "U", "D") for c in s[::2]])
        and all([c in ("L", "U", "D") for c in s[1::2]])
        else "No"
    )


if __name__ == "__main__":
    main()

Solution (Python):
n = input()

flag = True
for i in range(len(n)):
  if i%2 == 0:
    if n[i] == 'R' or n[i] == 'U' or n[i] == 'D':
      pass
    else:
      flag = False
      
  else:
    if n[i] == 'L' or n[i] == 'U' or n[i] == 'D':
      pass
    else:
      flag = False
      
if flag:
  print('Yes')
else:
  print('No')

Solution (Python):

S = input()


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

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

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

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

for i in range(0,int(len(S))):
  if i%2==0:
    if S[i]=='L':
        ans='No'
        break
  elif i%2==1:
    if S[i]=='R':
        ans='No'
        break
print(ans)

Solution (Python):
S = input()

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

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

flag1 = 1
for i in odd:
    if i not in ["R", "U", "D"]:
        flag1 = 0
flag2 = 1
for i in even:
    if i not in ["L", "U", "D"]:
        flag2 = 0
        
if flag1 == flag2 == 1:
    print("Yes")
else:
    print("No")

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

N=len(S)
ans='Yes'

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

Solution (Python):
char=list(input())
cnt = 0
for i in range(len(char)):
    if ((i+1)%2==1 and char[i]=="R" )or ((i+1)%2==1 and char[i]=="U")or ((i+1)%2==1 and char[i]=="D"):
        cnt +=1
    elif (i%2==1 and char[i]=="L" )or (i%2==1 and char[i]=="U")or (i%2==1 and char[i]=="D"):
        cnt +=1
    else:
        cnt=0
        break

    

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

Solution (Python):
import sys
from functools import reduce
import copy
import math


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    S = inputs[0]
    for i, c in enumerate(S):
        i += 1
        if i % 2 == 0:
            if c == 'R':
                return 'No'
        else:
            if c == 'L':
                return 'No'
    return 'Yes'


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Solution (Python):



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

Solution (Python):
S = input()

is_easy = True

for i in range(len(S)):
    if i % 2 == 0: 
        if S[i] not in 'RUD':
            is_easy = False
    else:
        if S[i] not in 'LUD':
            is_easy = False

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

Solution (Python):


S = list(input())
even = ['L','U','D']
odd = ['R','U','D']

ans_e, ans_o= [],[]

for i in range(1,len(S),2):
    if S[i] in even:
        ans_e.append(1)
    else:
        ans_e.append(0)

for i in range(0,len(S),2):
    if S[i] in odd:
        ans_o.append(1)
    else:
        ans_o.append(0)

if all(ans_o) and all(ans_e):
    print('Yes')
else:
    print('No')

Solution (Python):
a = input()

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

Solution (Python):
S = raw_input()

is_easy = True

for i in range(len(S)/2):
    if S[2*i] == "L":
        is_easy = False
    if S[2*i+1] == "R":
        is_easy = False

if len(S) == 1:
    if S[0] == "L":
        is_easy = False


if is_easy == False:
    print "No"
else:
    print "Yes"

Solution (Python):
s=input()
odd='RUD'
even='LUD'
count=0
for i in range(len(s)):
  if i%2==0:
    if s[i] in odd:
      count+=1
  else:
    if s[i] in even:
      count+=1
if count==len(s):
  print('Yes')
else:
  print('No')

Solution (Python):
import sys
S=str(input())
lst1=['R','U','D']
lst2=['L','U','D']    
l=len(S)
if l%2==0:
  for i in range(0,l-1,2):
    if S[i] in lst1:
      pass
    else:
      print('No')
      sys.exit()
  for j in range(1,l,2):
    if S[j] in lst2:
      pass
    else:
      print('No')
      sys.exit()
  print('Yes')
else:
  for i in range(0,l,2):
    if S[i] in lst1:
      pass
    else:
      print('No')
      sys.exit()
  for j in range(1,l-1,2):
    if S[j] in lst2:
      pass
    else:
      print('No')
      sys.exit()
  print('Yes')

Solution (Python):
import copy
s=list(input())
a=copy.deepcopy(s)
b=copy.deepcopy(s)
a=a[0::2]
b=b[1::2]
resulta="L" in a
resultb="R" in b
if resulta == False and resultb == False:
  print("Yes")
else:
  print("No")

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

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

n = len(S)
check = True
for i in range(n):
    if i % 2 == 0:
        if S[i] not in odd:
            check = False
    else:
        if S[i] not in even:
            check = False

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

Solution (Python):


def is_easy(S):
    for i, s in enumerate(S):
        if i % 2 == 0 and s == 'L':
            return 'No'
        elif i % 2 == 1 and s == 'R':
            return 'No'
    return 'Yes'

def main():
    S = input()
    print(is_easy(S))   

main()

Solution (Python):
s = input()

ans = "Yes"

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

print(ans)

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

Solution (Python):
def receuve_input():
    input_string = str(input())
    return input_string

def judge_steppable(input_string):
    even_strings = [s for i,s in enumerate(input_string) if i % 2 == 1]
    odd_strings = [s for i,s in enumerate(input_string) if i % 2 == 0]

    if 'R' not in even_strings and 'L' not in odd_strings:
         print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    input_string = receuve_input()
    judge_steppable(input_string)

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")
            break
    else:
        if s[i] != "L" and s[i] != "U" and s[i] != "D":
            print("No")
            break
else:
    print("Yes")

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

Solution (Python):
moves = input()

easy = True
for i in range(len(moves)):
  if i % 2 == 0 and not moves[i] in "RUD":
    easy = False
    break
  if i % 2 == 1 and not moves[i] in "LUD":
    easy = False
    break

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

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

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

Solution (Python):
ans = True
S = input()
i = 0
while i < len(S):
  if S[i] == "L":
    ans = False
  i += 2
j = 1
while j < len(S):
  if S[j] == "R":
    ans = False
  j += 2
if ans:
  print("Yes")
else:
  print("No")

Solution (Python):
string = input()
odd = 'RUD'
even = 'LUD'
ans = "Yes"
for i in range(len(string)):
    if (i % 2 != 0 and string[i] not in even) or (i % 2 == 0 and string[i] not in odd):
        ans = "No"
        break
print (ans)

Solution (Python):
char_list = input()
odd = char_list[0::2]
even = char_list[1::2]
odd_easy = ['R','U','D']
even_easy = ['L','U','D']
odd_result = []
even_result = []
true_false = []

for char in odd:
 if char in odd_easy:
  odd_result.append('True')
 else:
  odd_result.append('False')

for char in even:
 if char in even_easy:
  even_result.append('True')
 else:
  even_result.append('False')

true_false = odd_result + even_result

if 'False' in true_false:
 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()
ans = "Yes"
for i in range(len(s)):
    if (i+ 1)% 2:
       if s[i] == "L":
           ans = "No"
    else:
        if s[i] == "R":
            ans = "No"
print(ans)

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

f = False

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

Solution (Python):
Str = input()
num = 0
for i in range(len(Str)):
    char = Str[i]
    if (i + 1) % 2 == 0 and i != 0:
        if char != "L" and char != "U" and char != "D":
            num = 1
    else:
        if char != "R" and char != "U" and char != "D":
            num = 1
if num == 1:
    print("No")
else:
    print("Yes")

Solution (Python):
S=list(input())
l=len(S)
e=0
ki=["R","U","D"]
gu=["L","U","D"]
tmp=l//2
if l%2 ==0:
	for i in range(tmp):
		char1=S[2*i]
		char2=S[2*i+1]
		if char1 not in ki:
			e=1
		if char2 not in gu:
			e=1


else:
	charL=S[l-1]
	if charL not in ki:
		e=1	

	else:
		for i in range(tmp): 
			char1=S[2*i]
			char2=S[2*i+1]
			if char1 not in ki:
				e=1
			if char2 not in gu:
				e=1

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

Solution (Python):
dance = input()
i=1
flag=0
for char in dance:
  if i%2==1:
    if not char in ['R','U','D']:
      flag=1
      break
  else:
    if not char in ['L','U','D']:
      flag=1
      break   
  i += 1
if flag == 1:
  print('No')
else:
  print('Yes')

Solution (Python):
S = input()
l = len(S)
N = 0
for i in range(l):
    if(i % 2 == 0):
        if S[i] != "R" and S[i] != "U" and S[i] != "D":
            N = 1
    else:
        if S[i] != "L" and S[i] != "U" and S[i] != "D":
            N = 1

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

Solution (Python):
step = input()

ng = ["L", "R"]

for i in range(0, len(step)):
  if step[i] == ng[i%2]:
    print("No")
    exit()
print("Yes")

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

Solution (Python):
s=input()

if all(map(lambda _s: _s in "RUD", s[0::2])) and all(map(lambda _s: _s in "LUD", s[1::2])):
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()

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

Solution (Python):
S=str(input())
r='Yes'
for i,x in enumerate(S):
    if i%2==0 and x=='L':
        r='No'
        break
    if i%2==1 and x=='R':
        r='No'
        break
print(r)

Solution (Python):
s = input()

good = True
for i, c in enumerate(s):
    if (i+1)&1 == 0 and c == 'R':
        good = False
        break
    if (i+1)&1 == 1 and c == 'L':
        good = False
        break

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

Solution (Python):
step = input()
ok = True
for i, tap in enumerate(step):
    if i % 2 == 1 and tap in ['R'] :
        ok = False
    elif i % 2 == 0 and tap in ['L']:
        ok = False

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

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

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

Solution (Python):
s = input()
i = 1
ans = 'Yes'
l1 = ('R', 'U', 'D')
l2 = ('L', 'U', 'D')
for c in s:
    if i % 2 == 1:
        if c not in l1:
            ans = 'No'
            break
    else:
        if c not in l2:
            ans = 'No'
            break
    i += 1
print(ans)

Solution (Python):

S = ' ' + input()  
flag = True 

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

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

Solution (Python):

s = input()

even = ""
odd  = ""


for idx,s in enumerate(s):
    if idx == 0 or idx % 2 == 0:
        even += s
    else:
        odd += s


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


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

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


for x in range(len(s)):
    if x%2 == 0:
        if s[x]=="R" or s[x]== "U" or s[x]== "D":
            a=a
        else:

            a=a+1
    else:
        if s[x] == "L" or s[x]== "U" or s[x]== "D":
            a=a
        else:
            a=a+1

if a==0 :
    print("Yes")

else:
    print("No")

Solution (Python):
S = input()
o = "Yes"

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

print(o)

Solution (Python):
s = str(input())
Odd = s[::2]
Even = s[1::2]
Ocount =0
Ecount =0
for i in range(len(Odd)):
  if Odd[i] == "R" or Odd[i] == "U" or Odd[i] == "D":
     Ocount +=1
     if len(Even)==0:
        print("Yes")
        quit()      
for i in range(len(Even)):
  if Even[i] == "L" or Even[i] == "U" or Even[i] == "D":
    Ecount +=1
  if Ecount == len(Even) and Ocount == len(Odd):
    print("Yes")
    quit()
print("No")

Solution (Python):
S = input()

for i,j in enumerate(list(S)):
    
    if (i % 2 != 0 and j == 'R') or (i % 2 == 0 and j == 'L'):
            print('No')
            exit()

print('Yes')

Solution (Python):
S = list(input())
odd = ['R','U','D']
even = ['L','U','D']
boolean = []
for i in range(0,len(S)):
    if (i+1) % 2 == 1:
        boolean.append(S[i] in odd)
    else:
        boolean.append(S[i] in even)
if all(boolean):
    print('Yes')
else:
    print('No')

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

Solution (Python):


import sys,collections,itertools,re,math,fractions,decimal,random,array,bisect,heapq





def solve(f):
    s = f.read_str()
    if 'L' in s[::2]:
        return "No"
    if 'R' in s[1::2]:
        return "No"
    return "Yes"


class Reader(object):
    def __init__(self, filename=None):
        self.file = open(filename) if filename is not None else None
        self.case = 1

    def __readline(self):
        return self.file.next().strip() if self.file else raw_input()

    def next_case(self):
        self.file.next()
        self.case += 1

    def read_int(self): return int(self.__readline())
    def read_float(self): return float(self.__readline())
    def read_long(self): return long(self.__readline())
    def read_decimal(self): return decimal.Decimal(self.__readline())
    def read_str(self): return self.__readline()

    def read_int_list(self): return map(int, self.__readline().split())
    def read_float_list(self): return map(float, self.__readline().split())
    def read_long_list(self): return map(long, self.__readline().split())
    def read_decimal_list(self): return map(decimal.Decimal, self.__readline().split())
    def read_str_list(self): return self.__readline().split()

if __name__ == '__main__':
    filename = sys.argv[1] if len(sys.argv) > 1 else None
    f = Reader(filename)
    if f.file:
        while True:
            print "Case 
            try:
                f.next_case()
            except StopIteration:
                break
    else:
        print solve(f)

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

Solution (Python):
S=list(input())
index =-1
Odd =[]
Even =[]
for i in S:
	index +=1
	if index % 2 == 0 :
		Odd.append(i)
	else:
		Even.append(i)
print("No" if 'L' in Odd or "R" in Even else 'Yes' )

Solution (Python):
S = input()

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

print('Yes')

Solution (Python):
s = input()

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

odd_list = list(odd)
even_list = list(even)

for c in odd_list:
  if c == 'L':
    print('No')
    exit()

for c in even_list:
  if c == 'R':
    print('No')
    exit()

print('Yes')

Solution (Python):
S = input()
print(
    "Yes" if sum(
        [1 if i % 2 == 0 and S[i] in "RUD" else
         1 if i % 2 != 0 and S[i] in "LUD" else 0
         for i in range(len(S))]) == len(S)
    else "No")

Solution (Python):
input = input()

flag = 0
kisu = 1

for i in input:
	if kisu == 1:
		if i == "L":
			flag = 1
		kisu = 0
	else:
		if i == "R":
			flag = 1
		kisu = 1
	

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

Solution (Python):


s = list(input())

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

isEasy = True
for i in range(len(s)):
    if i%2 == 1:
        if s[i] in even:
            continue
        else:
            isEasy = False
    else:
        if s[i] in odd:
            continue
        else:
            isEasy = False

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

Solution (Python):


s = (input())

odds = s[::2] 
evens = s[1::2] 
if 'L' in odds:
    print('No')
elif 'R' in evens:
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()

ans = 'Yes'
length  = len(S)

for i in range(0,length):
  

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

Solution (Python):
flags = ['Yes', 'No']

input_s = input()

odd_s = input_s[0::2]
even_s = input_s[1::2]

no_flag = ('L' in odd_s) | ('R' in even_s)

print(flags[no_flag])

Solution (Python):
S = input()

if 'L' not in S[0::2] and 'R' not in S[1::2]:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()

ans = 'Yes'
if 'L' in S[::2]:ans = 'No'
elif 'R' in S[1::2]: ans = 'No'
print(ans)

Solution (Python):
s = list(input())
f = True
for index, i in enumerate(s):
    if(index % 2 == 0):
        if(i == 'L'):
            f = False
            break
    if(index % 2 == 1):
        if(i == 'R'):
            f = False
            break
if(f):
    print('Yes')
else:
    print('No')

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    d = {"Sunny":1 , "Cloudy":2, "Rainy":0}
    a = ["Sunny", "Cloudy", "Rainy"]
    print(a[d[input()]])
    return


def B():
    s = S()
    for i, si in enumerate(s):
        if i % 2:
            if si == "R":
                print("No")
                return
        else:
            if si == "L":
                print("No")
                return
    print("Yes")
    return


def C():
    n, k, q = LI()
    d = [0] * n
    for _ in range(q):
        a = II() - 1
        d[a] += 1
    for a in d:
        if k - (q - a) > 0:
            print("Yes")
        else:
            print("No")
    return


def D():
    n, = LI()
    a = LI()
    q = []
    for ai in a:
        heappush(q, ai)
    for _ in range(m):
        heappush(q, heappop(q) / 2)
    ans = 0
    while q:
        ans += int(heappop(q))
    print(ans)
    return


def E():
    return


def F():
    return


if __name__ == '__main__':
    B()

Solution (Python):
from __future__ import print_function


import sys
input = sys.stdin.readline

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd

def lcm(n,m):
    return int(n*m/gcd(n,m))

import re
import array
import copy
import functools
import operator

import collections
import itertools
import bisect
import heapq


from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace

from queue import PriorityQueue as pq

def reduce(p, q):
    common = fractions.gcd(p, q)
    return (p//common , q//common )



import random


def main():
    s = input()
    f_flag=0
    
    for i in range(len(s)):
        if i%2 == 0:
            if s[i] == "L":
                f_flag=1
        else:
            if s[i] == "R":
                f_flag=1

    if f_flag==0:
        print("Yes")
    else :
        print("No")
        
    return

if __name__ == '__main__':
    main()

Solution (Python):
import sys
dance = input()
even = "R"
odd = "L"

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













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

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

for i in range(len(S)):
  if (i+1)%2 == 1 and S[i] not in ['R', 'U', 'D']:
    print('No')
    exit()
  elif (i+1)%2 == 0 and S[i] not in ['L', 'U', 'D']:
    print('No')
    exit()

print('Yes')

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

Solution (Python):
a=input()

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

print("Yes")

Solution (Python):
s=input()

i=0
flug=0
for x in range(1,len(s)+1):
    if(x%2==1):
        if(s[x-1] =='L'):
            flug=1
            break
    else:
        if(s[x-1] =='R'):
            flug=1
            break

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

Solution (Python):
a = input()

b =  ['R','U','D']
c =  ['L','U','D']
f= 0
for n,x in enumerate(a):
    if n%2==0 and x not in b : f = 1
    elif n%2==1 and x not in c : f = 1
def Y(a,t = 0):
    if a==t : print('YES')
    else : print('NO')
def y(a, t =0):
    if a==t : print('Yes')
    else : print('No')
y(f)

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

Solution (Python):
S = ' ' + input()
even_pat = ['R','U','D']
odd_pat = ['L','U','D']

flag = True

for i in range(1,len(S)):
    if i % 2 == 1:
        if not(S[i] in even_pat):
            flag = False
            break
    
    else:
        if not(S[i] in odd_pat):
            flag = False
            break

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

Solution (Python):



tap = input("")
tap_num = 0
success = 0

for char in tap:
    if tap_num % 2 == 0:
        if char =="R" or char == "U" or char == "D":
            success += 1
            
    else:
        if char =="L" or char == "U" or char == "D":
            success += 1

    tap_num += 1

if success == tap_num:
    print("Yes")
else:
    print("No")

Solution (Python):
from re import match

S = input()

oddStep = r"R|U|D"
evenStep = r"L|U|D"

for st in S[0::2]:
	if not match(oddStep, st):
		print('No')
		exit()
for st in S[1::2]:
	if not match(evenStep, st):
		print('No')
		exit()
print('Yes')

Solution (Python):
lis = list(str(input()))
count = 0

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

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

Solution (Python):
S = str(input())
step_count = 0
ans='Yes'
for step in S:
    step_count += 1
    if step_count%2:
        if step == 'L':
            ans='No'
            break
            
    else:
        if step == 'R':
            ans='No'
            break
print(ans)

Solution (Python):
S = input()

S_even = S[0::2]
S_odd  = S[1::2]

if "L" in S_even or "R" in S_odd:
    print("No")
else:
    print("Yes")

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

ok = True
for i in range(len(str)):
    if i % 2 == 0:
        if str[i] in ["R", "U", "D"]:
            pass
        else:
            ok = False

            
    else:
        if str[i] in ["L", "U", "D"]:
            pass
        else:
            ok = False


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

Solution (Python):

s = input()

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

Solution (Python):
s=input()

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

Solution (Python):
S = input()

count = 0
for i in S:
    if count % 2 == 0:
        if i =='L':
            print('No')
            break
        else:
            count += 1
            continue
    else:
        if i == 'R':
            print('No')
            break
        else:
            count += 1
            continue

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

Solution (Python):
s = input()

even = []
odd = []
for i, j in enumerate(s):
    if i % 2 == 0:
        odd.append(j)
    else:
        even.append(j)

ans = 'No'
count = 0
for i in odd:
    if i == 'R' or i == 'U' or i == 'D':
        count+=1


count2 = 0
for i in even:
    if i == 'L' or i == 'U' or i == 'D':
        count2 +=1


if count == len(odd) and count2 == len(even):
    ans = 'Yes'


print(ans)

Solution (Python):
s = input()

ans = True
odd = True
for c in s:
    if odd:
        if c == 'L':
            ans = False
    else:
        if c == 'R':
            ans = False
    odd = not odd
if ans:
    print('Yes')
else:
    print('No')

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

Solution (Python):
x=input()
y=x[0::2]
z=x[1::2]
y=y.replace("U","")
y=y.replace("D","")
y=y.replace("R","")
z=z.replace("U","")
z=z.replace("D","")
z=z.replace("L","")
if y=="" and z=="":
  print("Yes")
else:
  print("No")

Solution (Python):


S = input()

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

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


if __name__ == "__main__":
    main()

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

c = 0
for s in S:
    if c%2 == 0:
        if not((s=='L') or (s=='U') or (s=='D')):
            print('No')
            exit()
    else:
        if not((s=='R') or (s=='U') or (s=='D')):
            print('No')
            exit()
    c += 1
print('Yes')

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