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

gu = S[1::2]
ki = S[0::2]
ans = ''
count = 0

if 'L' in ki or 'R' in gu:
    print('No')
else:
    print('Yes')

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

Solution (Python):
s=input()

i=0
f=True

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

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

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

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

Solution (Python):


s=raw_input()
so=''
se=''
for i in xrange(1,len(s),2):
 so+=s[i]
for i in xrange(0,len(s),2):
 se+=s[i]
if so.count('L')+so.count('U')+so.count('D')==len(so) and se.count('R')+se.count('U')+se.count('D')==len(se):
 print 'Yes'
else:
 print 'No'

Solution (Python):
def resolve():
    s=input()
    ki='RUD'
    gu='LUD'
    for i in range(len(s)):
        if (i%2==0 and s[i] not in ki) or (i%2==1 and s[i] not in gu):
            print('No')
            break
    else:
        print('Yes')
resolve()

Solution (Python):
def solve():
  s = input()
  flag = True
  for i in range(len(s)):
    if i%2 == 0:
      if not s[i] in ["R","U","D"]:
        flag = False
    else:
      if not s[i] in ["L","U","D"]:
        flag = False
  if flag:
    print("Yes")
  else:
    print("No")
solve()

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

n=0
for i in range(a):
    if i%2==0:
        if S[i]=="R" or S[i]=="U" or S[i]=="D":
            n+=0
        else:
            n+=1
    else:
        if S[i]=="L" or S[i]=="U" or S[i]=="D":
            n+=0
        else:
            n+=1


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

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


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

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

Solution (Python):
S = list(input())
o = len(set(S[1::2]) - {'L', 'U', 'D'})
e = len(set(S[0::2]) - {'R', 'U', 'D'})
print("No" if o+e > 0 else "Yes")

Solution (Python):
s = list(input())
sodd = set(s[0::2])
seve = set(s[1::2])
odd ={'R','U','D'}
even ={'L','U','D'}
print('Yes') if (sodd <= odd) and (seve <= even) else print('No')

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

Solution (Python):
S = input()

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

ans = "Yes"
for i in odd:
    if i not in "RUD":
        ans = "No"
        break

for i in even:
    if i not in "LUD":
        ans = "No"
        break

print(ans)

Solution (Python):
s = input()

for c in s[::2]:
    if c == 'L':
        print('No')
        exit(0)
for c in s[1::2]:
    if c == 'R':
        print('No')
        exit(0)

print('Yes')

Solution (Python):
s = input()

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

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

Solution (Python):
import re
hoge = list(input())
i = 0
while i < len(hoge):
    if i%2==0 and re.findall(r'[RDU]',hoge[i]):
        pass
    elif i%2==1 and re.findall(r'[LDU]',hoge[i]):
        pass
    else:
        break
    i+=1
if i == len(hoge):
  print('Yes')
else:
  print('No')

Solution (Python):
import sys
s = input()
for idx, i in enumerate(s):
    if i not in ['L','U','R','D']:
        print('No')
    elif i == 'R' and (idx+1) % 2 == 0:
        print('No')
        sys.exit()
    elif i == 'L' and (idx+1) % 2 == 1:
        print('No')
        sys.exit()
print("Yes")

Solution (Python):
S = input()

ans = 'Yes'

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

print(ans)

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

Solution (Python):

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


if __name__ == "__main__":
    main()

Solution (Python):
s = input()
i = 0
flag = True
for c in s:
  i += 1
  if (i % 2 == 0 and c == "R") or (i % 2 == 1 and c == "L"):
    print("No")
    exit(0)
print("Yes")

Solution (Python):
s = input()

ans = True

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

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

Solution (Python):

import sys


def solve(S: str):
    s = S

    g_str = s[1::2]
    k_str = s[0::2]

    if "R" in g_str:
        print("No")
    elif "L" in k_str:
        print("No")
    else:
        print("Yes")

    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)


if __name__ == "__main__":
    main()

Solution (Python):
s=input()
flg=0
for i in range(len(s)):
    if(s[i] in ['U','D']):
        pass
    elif(s[i]=='R'):
        if(i%2!=0):
            print("No")
            flg=1
            break
    elif(s[i]=='L'):
        if(i%2==0):
            print("No")
            flg=1
            break
if(flg==0):
    print("Yes")

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

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

for i in S[1::2]:
    if i not in ['L', 'U', 'D']:
        print("No")
        exit()

for i in S[0::2]:
    if i not in ['R', 'U', 'D']:
        print("No")
        exit()

print("Yes")

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

Solution (Python):
S = input()

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

Solution (Python):
import sys

s = input()

for i, c in enumerate(s):
    if (i + 1) % 2 == 0 and c in {'L', 'U', 'D'}:
        continue
    elif (i + 1) % 2 == 1 and c in {'R', 'U', 'D'}:
        continue
    else:
        print('No')
        sys.exit()

print('Yes')

Solution (Python):
S = input()


def solve():
    for i in range(len(S)):
        s = S[i]
        if i % 2 == 0:
            if s == 'L':
                return False
        else:
            if s == 'R':
                return False

    return True


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

Solution (Python):
from sys import stdin
S = (stdin.readline().rstrip())

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

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

Solution (Python):
import sys

str = input()
char_list = list(str)
i = 0
for item in char_list:
    i += 1
    if (i % 2 == 0 and item == 'R'):
        print("No")
        sys.exit()
    if (i % 2 == 1 and item == 'L'):
        print("No")
        sys.exit()
print("Yes")

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

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

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

Solution (Python):
s = input()
odd = "".join([i for idx,i in enumerate(s) if idx%2==0])
even = "".join([i for idx,i in enumerate(s) if idx%2==1])
if odd.replace("R","").replace("U","").replace("D","") or even.replace("L","").replace("U","").replace("D",""):
  print("No")
else:
  print("Yes")

Solution (Python):
from sys import exit


S = input()

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

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

even, odd = [], []

Yes = True

for i in range(char):
  if (i+1)%2 == 0: even.append(S[i])
  else: odd.append(S[i])
    
for i in odd:
  if not(i == 'R' or i == 'U' or i == 'D'): 
    Yes = False
    
for i in even:
  if not(i == 'L' or i == 'U' or i == 'D'): 
    Yes = False
  
if Yes == True: 
  print('Yes') 
else: 
  print('No')

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

Solution (Python):
t = input()
c=1
flag = 'Yes'
for i in t:
    if c % 2 ==1:
        if i == 'L':
            flag = 'No'
    else:
        if i =='R':
            flag = 'No'
    c = c +1
print(flag)

Solution (Python):

S=list(input())
f=1
e=0
for i in range(len(S)):
    if f:
        f=0
        if S[i]=='L':
            print('No')
            e=1
            break
    elif not f:
        f=1
        if S[i] =='R':
            print('No')
            e=1
            break
if not e:
    print('Yes')

Solution (Python):
print("YNeos"[any(c=="RL"[~i%2]for i,c in enumerate(input()))::2])

Solution (Python):
s = input()

odds = s[0::2]
if 'L' in odds:
    print('No')
    exit()

evens = s[1::2]
if 'R' in evens:
    print('No')
    exit()

print('Yes')

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

Solution (Python):
import sys


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


def main():
    S = input()
    ans = "Yes"
    for i in range(len(S)):
        if (i+1) % 2 == 1:
            if S[i] == "L":
                ans = "No"
        else:
            if S[i] == "R":
                ans = "No"
        if ans == "No":
            print(ans)
            exit()
    print(ans)


if __name__ == '__main__':
    main()

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

Solution (Python):
s=input()
a=0
for i in range(0,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=list(input())

s_odd=''.join(s[0::2]) 
s_even=''.join(s[1::2])

if s_odd.find('L')==-1 and s_even.find('R')==-1:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
def solve(S):
    return (all(c in 'RUD' for c in S[::2]) and
            all(c in 'LUD' for c in S[1::2]))
        
print 'Yes' if solve(raw_input()) else 'No'

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

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

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

Solution (Python):
s = input()
count=0
for i in range(len(s)):
  if i%2==0:
    if s[i]=='R' or s[i]=='U' or s[i]=='D':
      count+=1
  if i%2==1:
    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 = input()
even= list(set(S[0::2]))
odd = list(set(S[1::2]))
E = ["R", "U", "D"]
O = ["L", "U", "D"]
cnt = 0
for i in range(len(even)):
    if even[i] in E:
        cnt += 1
if cnt == len(even):
    flag_e = True
else:
    flag_e = False
cnt = 0
for i in range(len(odd)):
    if odd[i] in O:
        cnt += 1
if cnt == len(odd):
    flag_o = True
else:
    flag_o = False
print("Yes" if flag_o and flag_e else "No")

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

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

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

for i in range(len(dance)):
    if i%2 == 0:
        if dance[i] == "R" or dance[i] == "U" or dance[i] == "D":
            kekka = kekka + 1
    if i%2 == 1:
        if dance[i] == "L" or dance[i] == "U" or dance[i] == "D":
            kekka = kekka + 1

if kekka == len(dance):
    print("Yes")
else:
    print("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")
    exit()

print("Yes")

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

Solution (Python):
s=input()
for i in range(len(s)):
    if i%2==0 and s[i] not in 'RUD':
        print('No')
        break
    elif i%2==1 and s[i] not in 'LUD':
        print('No')
        break
else:
    print('Yes')

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

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

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

Solution (Python):
a = input()
b = len(a)

for i in range(b):
  if i % 2 == 0:
    if a[i] == 'R' or a[i] == 'U' or a[i] == 'D':
      continue
    else:
      print('No')
      exit()
  elif i % 2 == 1:
    if a[i] == 'L' or a[i] == 'U' or a[i] == 'D':
      continue

    else:
      print('No')
      exit()
      
print('Yes')

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

Solution (Python):
if __name__ == "__main__":
  inputstr = input()
  size = len(inputstr)
  isEasy = True

  for i in range(size):
    point = i + 1
    if point % 2 == 0:
      if inputstr[i] in ["L", "U", "D"]:
        pass
      else:
        isEasy = False
        break
    else:
      if inputstr[i] in ["R", "U", "D"]:
        pass
      else:
        isEasy = False
        break

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

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

def SORO_INT(): return int(INPUT())
def MULT_INT_LIST(): return list(map(int, INPUT().split()))
def MULT_INT_MAP(): return map(int, INPUT().split())
def SORO_STRING(): return INPUT()
def MULT_STRING(): return INPUT().split()

S = SORO_STRING()
S = list(S)
S_ki = S[0::2]
S_gu = S[1::2]
if 'R' in S_gu:
    print('No')
    sys.exit()
if 'L' in S_ki:
    print('No')
    sys.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 = input()

a = len(S)
cnt = 0
for i in range(a):

  if i % 2==0:

    if S[i] != "L":
      cnt +=1
    elif S[i] == "L":
      cnt -= 101

  elif i %2 ==1:

    if S[i] != "R":
      cnt +=1
    elif S[i]=="R":
      cnt -= 101

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

Solution (Python):
S = input()
S_list = list(S)
odd  = S_list[0::2]
even = S_list[1::2]
flag = "green"

for i in range(len(odd)):
    if odd[i] == "L":
        flag = "red"
for i in range(len(even)):
    if even[i] == "R":
        flag = "red"
if flag == "red":
    print("No")
else:
    print("Yes")

Solution (Python):
def solve():
    s = input()
    num = 1
    for w in s:
        if num %2 == 0:
            if w == 'L' or w == 'U' or w == 'D':
                num+=1
            else:
                print('No')
                return
        else:
            if w == 'R' or w == 'U' or w == 'D':
                num+=1
            else:
                print('No')
                return
    print('Yes')


if __name__ == "__main__":
    solve()

Solution (Python):
S = input()

a = len(S)
cnt = 0
for i in range(a):

  if i % 2==0:

    if S[i] != "L":
      cnt +=1
    elif S[i] == "L":
      cnt -= 101

  elif i %2 ==1:

    if S[i] != "R":
      cnt +=1
    elif S[i]=="R":
      cnt -= 101

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

Solution (Python):
text = input()
odds= []
evens = []
flag1 = True
flag2 = True
for i in range(0,len(text),2):
    
    if text[i]=='L':
        flag1 = False
        break
    
for j in range(1,len(text),2):
    
    if text[j]=='R':
        flag2 = False
        break

if(not(flag1 and flag2)):
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()
S_list = list(S)
odd  = S_list[0::2]
even = S_list[1::2]
flag = "green"

for i in range(len(odd)):
    if odd[i] == "L":
        flag = "red"
for i in range(len(even)):
    if even[i] == "R":
        flag = "red"
if flag == "red":
    print("No")
else:
    print("Yes")

Solution (Python):
input0=input("")
e=0
f=0
g=0
i=0

c=input0[::2]
d=input0[1::2]

for a in c:
    b=2
    if(a=="L"):
        b=1
    else:
        b=0
    e=e+b
    
for a in d:
    b=2
    if(a=="R"):
        b=1
    else:
        b=0
    f=f+b

g=e+f

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

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

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

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

Solution (Python):
s = input()

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

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

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

Odd = S[0::2]
Even = S[1::2]

for i in range(len(Odd)):
    if 'L' == Odd[i]:
        l = 0
        break
    else:
        l = 1

r = 1
for j in range(len(Even)):
    if 'R' == Even[j]:
        r = 0
        break
    else:
        r = 1

if l+r == 2:
    print('Yes')
else:
    print('No')

Solution (Python):
S=input()
flag=True
for i,v in enumerate(S):
    if i%2==0:
        if (v!="R" and v!="U") and v!="D":
            flag=False
            break
    else:
        if (v!="L" and v!="U") and v!="D":
            flag=False
            break
if flag:
    print("Yes")
else:
    print("No")

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

Solution (Python):
S = list(input())
S_o = []
S_e = []
for i in range(len(S)):
    if i%2 == 0:
        S_e.append(S[i])
    elif i%2 == 1:
        S_o.append(S[i])
if ('R' not in set(S_o)) and ('L' not in set(S_e)):
    print('Yes')
else:
    print('No')

Solution (Python):
str_s = input()
ret = "Yes"
for i, n in enumerate(str_s):
    i = int(i)
    if (i+2) % 2 == 0:
        if n not in ("R", "U", "D"):
            ret = "No"
            break
    elif (i+1) % 2 == 0:
        if n not in ("L", "U", "D"):
            ret = "No"

print(ret)

Solution (Python):
S = input()

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

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

Solution (Python):
import sys

s = input()

Ll = [i for i, x in enumerate(s) if x == 'L']
Rl = [i for i, x in enumerate(s) if x == 'R']

for i in range(len(Ll)):
    if Ll[i] % 2 == 0:
        print('No')
        sys.exit()
for i in range(len(Rl)):
    if Rl[i] % 2 == 1:
        print('No')
        sys.exit()
print('Yes')

Solution (Python):
import sys
dance = input()
num = 0
odd = []
even = []
for i in dance:
    num += 1
    if num %2 == 0:
        even.append(i)
    else:
        odd.append(i)
for i in odd:
    if i == "L":
        print('No')
        sys.exit()
    else:
        pass
for i in even:
    if i == "R":
        print('No')
        sys.exit()
    else:
        pass
print('Yes')

Solution (Python):
S=input()
n=len(S)
hantei1,hantei2=1,1
for i in range(0,n,2):
    if S[i]=='R' or S[i]=='U' or S[i]=='D':
        continue
    else:
        hantei1=0
        break

for j in range(1,n,2):
    if S[j]=='L' or S[j]=='U' or S[j]=='D':
        continue
    else:
        hantei2=0
        break

if hantei1 == 1 and hantei2 == 1:
    print('Yes')
else:
    print('No')

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

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

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

Solution (Python):
S=input()
O=S[::2]
E=S[1::2]
cnt=0
for k in O:
  if k in 'RUD':
    cnt+=1
for j in E:
  if j in 'LUD':
    cnt+=1
if cnt==len(S):
  print('Yes')
else:
  print('No')

Solution (Python):
s = str(input())
 
cnt = 0
for i in range(0, len(s)):

    if i % 2 == 0:
        if s[i] == "L":
            cnt = 1
            break

    else:
        if s[i] == "R":
            cnt = 1
            break

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

Solution (Python):
S = input()
flag = True
for i in range(len(S)):
    s = S[i]
    
    if (i+1) % 2 == 1:
        if not(s == "R" or s == "U" or s == "D"):
            flag = False
            break
    elif (i+1) % 2 == 0:
        if not(s == "L" or s == "U" or s == "D"):
            flag = False
            break

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

Solution (Python):



def main():
    ret = 'Yes'
    S = str(input())
    for i in range(len(S)):
        if i%2 == 0: 
            if S[i] not in ['R', 'U', 'D']:
                ret = 'No'
                break
        else: 
            if S[i] not in ['L', 'U', 'D']:
                ret = 'No'
                break
    print(ret)

if __name__ == '__main__':
    main()

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

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

if __name__ == "__main__":
    main()

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

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

ans = "Yes"

for i in range(0, len(S_even)):
    if S_even[i] == "R":
        ans = "No"

for i in range(0, len(S_odd)):
    if S_odd[i] == "L":
        ans = "No"
        
print(ans)

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

Solution (Python):
S = input()

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

print('Yes')

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

if err_flg:
    print('{}'.format('No'))
else:
    print('{}'.format('Yes'))

Solution (Python):



import sys, os

def main():
    ans = "Yes"
    steps = list(input())
    for i, st in enumerate(steps):
        if (i%2 == 1):
            if st == "R":
                ans = "No"
        else:
            if st == "L":
                ans = "No"
    print(ans)    
if __name__ == "__main__" :
    main()

Solution (Python):
s=input()
N=len(s)
a="Yes"

for i in range (0,N):
  if i%2==0:
    if (s[i]!="R") and (s[i]!="U") and (s[i]!="D"):
      a="No"
      break
  else:
    if (s[i]!="L") and (s[i]!="U") and (s[i]!="D"):
      a="No"
      break
print(a)

Solution (Python):
S = input()


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

Solution (Python):
s = input()
t = list(s)
o = t[::2]
e = t[1::2]
if "L" not in o and "R" not in e:
    print("Yes")
else:
    print("No")

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

Solution (Python):
def main():
    odd = False
    even = False

    odds = []
    evens = []
    for i, s in enumerate(list(input())):
        if i % 2 == 0:
            evens.append(s in ['R', 'U', 'D'])
        else:
            odds.append(s in ['L', 'U', 'D'])

    odd = odds.count(False) == 0
    even = evens.count(False) == 0

    r = 'No'
    if odd and even:
        r = 'Yes'

    print(r)


if __name__ == "__main__":
    main()

Solution (Python):
a=list(input())
b=a[0::2]
c=a[1::2]
d=b.count("L")
e=c.count("R")
if d != 0:
    ans="No"
elif e != 0:
    ans="No"
else:
    ans="Yes"
print(ans)

Solution (Python):
s=str(input())
L = list(s)
count = 0
n = 0
for i in L:
  n += 1
  if n % 2 == 0:
    if i == "R":
      count += 1
  else:
    if i == "L":
      count += 1
if count == 0:
  print("Yes")
else:
  print("No")

Solution (Python):
S = list(input())
check = 0
for i in range(len(S)):
  if i % 2 == 0:
    if (S[i] == 'R' or S[i] == 'U' or S[i] == 'D') and len(S) >= 1 and len(S) <= 100:
        check += 1
  elif i % 2 == 1:
    if (S[i] == 'L' or S[i] == 'U' or S[i] == 'D') and len(S) >= 1 and len(S) <= 100:
        check += 1

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

Solution (Python):
Dance = input()
i = 0
flag = 0
for char in Dance:
  if i%2 == 1:
    if char == "R":
      flag = 1
      break
  else:
    if char == "L":
      flag = 1
      break
  i+=1
  
if flag == 0:
  print("Yes")
else:
  print("No")

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


index_num_R = [n for n, v in enumerate(S) if v == "R"]
index_num_L = [n for n, v in enumerate(S) if v == "L"]


count_R = 0
count_L = 0

for num_R in index_num_R:
  if num_R %2==1:
    count_R = count_R +1

  
for num_L in index_num_L:
  if num_L %2==0:
    count_L = count_L +1


if count_R==0 and count_L==0:
  print("Yes")
else:
  print("No")

Solution (Python):
a = input()
a_num = int(len(a))
a_list = [i for i in a]
b = 0
for j in range(0,a_num,2):
     try:   
      if a_list[j] == "L" or a_list[j+1] == "R":
        print("No")
        b = 1
        break
     except:
         break
if b == 0:
    print("Yes")