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):
def resolve():
    S = input()
    for i, c in enumerate(list(S)):
        if i%2==0:
            if c == "L":
                print("No")
                return
        else:
            if c == "R":
                print("No")
                return
    print("Yes")

if '__main__' == __name__:
    resolve()

Solution (Python):
S=input()
isOK=True
for i in range(len(S)):
  if((i+1)%2==1):
    if(S[i]=="L"):
      isOK=False
  else:
    if(S[i]=="R"):
      isOK=False
      
if(isOK):
  print("Yes")
else:
  print("No")

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

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

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

Solution (Python):
import numpy as np
s = input()
ns = np.array(list(s))
n1 = ns[::2]
n2 = ns[1::2]
if not 'L' in n1 and not 'R' in n2:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()

ans = 'Yes'
for i, si in enumerate(s):
    if ((i % 2 == 0) and (si == 'L')) or ((i % 2 == 1) and (si == 'R')):
        ans = 'No'
        break
print(ans)

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

Solution (Python):
S = input()

for i, ch in enumerate(S):
    if i % 2 == 0 and ch == 'L':
        print("No")
        exit()
    elif i % 2 == 1 and ch == 'R':
        print('No')
        exit()    
print("Yes")

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

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

Solution (Python):
import sys

s = input()

for c in s[::2]:
    if(c == 'L'):
        print("No")
        sys.exit()

for c in s[1::2]:
    if(c == 'R'):
        print("No")
        sys.exit()

print("Yes")

Solution (Python):
a = ['R','U','D']
b = ['L','U','D']
s = input()
flag = True
for i in range(len(s)):
    if (i+1) % 2 == 0:
        if s[i] not in b:
            flag = False
    else:
        if s[i] not in a:
            flag = False

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

Solution (Python):

import sys
s = list(input())
one=["R", "U", "D"]
two=["L", "U", "D"]
for i in range(len(s)):
    if i % 2 == 0 and (one[0] != s[i] and one[1]!=s[i] and one[2]!=s[i]):
        print("No")
        sys.exit()
    if i % 2 != 0 and(two[0] != s[i] and two[1]!=s[i] and two[2]!=s[i]):
        print("No")
        sys.exit()
print('Yes')

Solution (Python):
import sys

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

Solution (Python):
S=list(input())
count=0
for i in range(len(S)):
  if i%2==0 and (S[i]=="R" or S[i]=="U" or S[i]=="D"):
    count+=1  
  elif i%2==1 and (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()

sa = s[::2]
sb = s[1::2]

for i in sa:
  if i == "L":
    print("No")
    exit()

for j in sb:
  if j == "R":
    print("No")
    exit()
print("Yes")

Solution (Python):
S=input()

for s in S[::2]:
    if s=='L':
        print ('No')
        exit()

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

print('Yes')

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

i = 0
for e in s:
    if i % 2 == 0 and e == 'L':
        print('No')
        sys.exit()
    elif i % 2 == 1 and e == 'R':
        print('No')
        sys.exit()
    i += 1

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

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

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

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

print('Yes')

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

Solution (Python):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

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

Solution (Python):
s = input()
even, odd = [], []
for i in range(len(s)):
    if i%2:
        odd.append(s[i])
    else:
        even.append(s[i])
e = list(set(odd))
o = list(set(even))
if('L' in o or 'R' in e):
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()
N = len(S)
for i in range(N):
    if i%2==0:
        if not(S[i]=="R" or S[i]=="U" or S[i]=="D"):
            print("No")
            break

    else:
        if not (S[i]=="L" or S[i]=="U" or S[i]=="D"):
            print("No")
            break
else:
    print("Yes")

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


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

Solution (Python):
def main():
    S = input().rstrip()
    for idx, s in enumerate(S, start=1):
        if idx % 2 == 1 and s not in ["R", "U", "D"]:
            print("No")
            exit()
        elif idx % 2 == 0 and s not in ["L", "U", "D"]:
            print("No")
            exit()
    print("Yes")


if __name__ == '__main__':
    main()

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

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

if "L" in S[0::2] or "R" in S[1::2]:
  a = "No"

print(a)

Solution (Python):
s = input()

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

Solution (Python):

S = input()
S1 = S[0::2]
S2 = S[1::2]
ans1 = S1.count("R") + S1.count("U") + S1.count("D")
ans2 = S2.count("L") + S2.count("U") + S2.count("D")
if ans1 == len(S1) and ans2 == len(S2):
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
S_even = S[1::2]
S_odd = S[0::2]

if 'L' not in S_odd and 'R' not in S_even:
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()

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

else :
    print("Yes")

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

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

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

Solution (Python):
s = input()
ans = 'Yes'
for i,k in enumerate(s):
  num = i + 1
  if num % 2 == 0 and k not in set('LUD'):
    ans = 'No'
    break
  if num % 2 == 1 and k not in set('RUD'):
    ans = 'No'
    break
print(ans)

Solution (Python):
S = input()

for i in S[::2]:
  if i not in "RUD":
    print("No")
    exit()

for i in S[1::2]:
  if i not in "LUD":
    print("No")
    exit()
    

print("Yes")

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

Solution (Python):
s = str(input())
bool =False
for i in range (len(s)):
  if i % 2 == 0 and s[i] == 'L':
    bool = True
  elif i % 2 != 0 and s[i] == 'R':
    bool = True
if bool == True:
  print("No")
else:
  print("Yes")

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

Solution (Python):
"""
    こんにちは。これはクシャルです
    
    Author : thekushalghosh (クシャル)
    Team   : CodeDiggers
 
    I prefer Python language over the C++ language :p :D
        
    Visit my website : thekushalghosh.github.io
"""
import sys,math,cmath,time
start_time = time.time()



def solve():
    s = insr()
    q = "Yes"
    for i in range(len(s)):
        if (i % 2 == 0 and s[i] == "L") or (i % 2 != 0 and s[i] == "R"):
            q = "No"
    print(q)
    


 
def main():
    global tt
    if not ONLINE_JUDGE:
        sys.stdin = open("input.txt","r")
        sys.stdout = open("output.txt","w")
    t = 1
    for tt in range(t):
        solve()
    if not ONLINE_JUDGE:
        print("Time Elapsed :",time.time() - start_time,"seconds")
        sys.stdout.close()
    

def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    return(input().strip())
def invr():
    return(map(int,input().split()))
 

def counter(a):
    q = [0] * max(a)
    for i in range(len(a)):
        q[a[i] - 1] = q[a[i] - 1],1
    return(q)
 
def string_counter(a):
    q = [0] * 26
    for i in range(len(a)):
        q[ord(a[i]) - 97] = q[ord(a[i]) - 97],1
    return(q)

def factors(n):
    q = []
    for i in range(1,int(n ** 0.5) + 1):
        if n % i == 0: q.append(i); q.append(n // i)
    return(list(sorted(list(set(q)))))

def prime_factors(n):
    q = []
    while n % 2 == 0: q.append(2); n = n // 2
    for i in range(3,int(n ** 0.5) + 1,2):
        while n % i == 0: q.append(i); n = n // i
    if n > 2: q.append(n)
    return(list(sorted(q)))


ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
    input = sys.stdin.readline
main()

Solution (Python):
import sys




def main():
    S = input()
    count =1
    for i in S:
        if count %2==1 and i =="L":
            print("No")
            exit()
        elif count%2 ==0 and i =="R":
            print("No")
            exit()

        count+=1
    print("Yes")





if __name__ == "__main__":
    main()

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

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

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

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

print('Yes')

Solution (Python):

s = input()
o = [i == "L" for i in s[::2]] + [i == "R" for i in s[1::2]]
print("YNeos"[sum(o) != 0::2])

Solution (Python):
s = input()

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

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

Solution (Python):
import math

S = list(input())
a =0
b = 0
n=len(S)
for i in range(0,n,2):
  if(S[i]=="R" or S[i]=="U" or S[i]=="D"):
    a +=1
for j in range(1,n,2):
  if(S[j]=="L" or S[j]=="U" or S[j]=="D"):
    b+=1
if(a==math.ceil(n/2) and b ==math.floor(n/2)):
  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 not s[i] in odd:
            print("No")
            exit(0)
    else:
        if not s[i] in even:
            print("No")
            exit(0)

print("Yes")

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

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

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

Solution (Python):
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

Solution (Python):
def main():
    S = input()
    odd_list=['R', 'U', 'D']
    eve_list=['L', 'U', 'D']
    odd = S[0::2]
    eve = S[1::2]
    for i in odd:
        if i not in odd_list:
            print('No')
            return
    for i in eve:
        if i not in eve_list:
            print('No')
            return
    print('Yes')

main()

Solution (Python):
def main():
    S = input()
    odd_list=['R', 'U', 'D']
    eve_list=['L', 'U', 'D']
    odd = S[0::2]
    eve = S[1::2]
    for i in odd:
        if i not in odd_list:
            print('No')
            return
    for i in eve:
        if i not in eve_list:
            print('No')
            return
    print('Yes')

main()

Solution (Python):
def main():
    S = input()
    odd_list=['R', 'U', 'D']
    eve_list=['L', 'U', 'D']
    odd = S[0::2]
    eve = S[1::2]
    for i in odd:
        if i not in odd_list:
            print('No')
            return
    for i in eve:
        if i not in eve_list:
            print('No')
            return
    print('Yes')

main()

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

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

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

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

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

def main():
    s = list(input())
    for i in range(len(s)):
        if s[i] == 'U' or s[i] == 'D':
            pass
        elif i % 2 == 0 and s[i] == 'R':
            pass
        elif i % 2 == 1 and s[i] == 'L':
            pass
        else:
            print('No')
            return
    print('Yes')

if __name__ == '__main__':
    main()

Solution (Python):
s = str(input())
count = 0
a = ["R", "U", "D"]
b = ["L", "U", "D"]
for i in s[::2]:
    if i in a:
        pass
    else:
        count = 1
        break
for i in s[1::2]:
    if i in b:
        pass
    else:
        count = 1
        break
print("Yes" if count == 0 else "No")

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

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

Solution (Python):
S = input()
A = ['R', 'U', 'D']
B = ['L', 'U', 'D']
for i,j in enumerate(S):
    if((i+1)%2==0):
        if( j not in B):
            print('No')
            exit()
    else:
        if(j not in A):
            print('No')
            exit()
print('Yes')

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

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

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

Solution (Python):
s = input()

odd  = [ (c in 'RUD') for i, c in enumerate(s) if i % 2 == 0 ]
even = [ (c in 'LUD') for i, c in enumerate(s) if i % 2 == 1 ]

if all(odd) and all(even):
  print('Yes')
else:
  print('No')

Solution (Python):
def main():
    s = input()
    nagasa = len(s)

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

    
    
    
if __name__ == "__main__":
    main()

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    S = readline().strip()
    
    odd = {'R', 'U', 'D'}
    even = {'L', 'U', 'D'}
    
    ans = 'Yes'
    for i, c in enumerate(S):
        if not i % 2 and c not in odd:
            ans = 'No'
        elif i % 2 and c not in even:
            ans = 'No'
    
    print(ans)
    return


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
S=list(input())
S_odd=S[::2]
S_even=S[1::2]
flag=1
for i in S_odd:
    if i != "R" and i != "U" and i != "D":
        print("No")
        exit(0)
    for j in S_even:
        if j != "L" and j != "U" and j != "D":
            print("No")
            exit(0)
print("Yes")

Solution (Python):
S=input()

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

Solution (Python):
def main():
    s = list(input())
    cnt = 0
    for i in range(len(s)):
        if i % 2 == 0 and s[i] in ['R', 'U', 'D']:
            cnt += 1
        elif i % 2 == 1 and s[i] in ['L', 'U', 'D']:
            cnt += 1
    if cnt == len(s):
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
S = input()
val = True
for i in range(1, len(S) + 1):
    if i % 2 and (S[i - 1] in ['R', 'U', 'D']):
        pass
    elif i % 2 == 0 and (S[i - 1] in ['L', 'U', 'D']):
        pass
    else:
        val = False
    if not val:
        print('No')
        break
else:
    print('Yes')

Solution (Python):
S = input()
O = ['R','U','D']
E = ['L','U','D']
ng = False
for i in range(len(S)):
  if i % 2 == 0:
    if S[i] not in O:
      ng = True
      break
  else:
    if S[i] not in E:
      ng = True
      break
print('No') if ng else print('Yes')

Solution (Python):

def main():
  dance = input()
  
  for i in range(0, len(dance)):
    if (i+1) % 2 == 0:
      if dance[i] == "R": 
        print("No")
        return 0
    else:
      if dance[i] == "L":
        print("No")
        return 0
  print("Yes")
  return 1

main()

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

for i in range(1, len(s)+1):
    if i % 2 == 1:
        if s[i-1] == 'R' or s[i-1] == 'U' or s[i-1] == 'D':
            pass
        else:
            k = False
            break
    elif i % 2 == 0:
        if s[i-1] == 'L' or s[i-1] == 'U' or s[i-1] == 'D':
            pass
        else:
            k = False
            break

if k == True:
    print("Yes")
elif k == False:
    print("No")

Solution (Python):
import sys
list=input()
def split(a): 
    return [char for char in a]
list=split(list)
even_count=0
odd_count=0
for i in list:
  if even_count%2==0:
      even_count+=1
      continue
  if list[even_count]=="R":
    print("No")
    sys.exit()
  even_count+=1
for i in list:
  if odd_count%2==1:
      odd_count+=1
      continue
  if list[odd_count]=="L":
    print("No")
    sys.exit()
  odd_count+=1
print("Yes")

Solution (Python):
s=input()
cont=0
for i in range(0,len(s),2):
  if s[i]=="L":
    print("No")
    cont+=1
    break
for j in range(1,len(s),2):
  if s[j]=="R" and cont==0:
    print("No")
    cont+=1
    break
if cont==0:
    print("Yes")

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

Solution (Python):

def main():
    s = input()
    for i in range(0,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')


if __name__ == '__main__':
    main()

Solution (Python):
S = input()
flg = True
for i in range(1, len(S) + 1):
    if i % 2 and (S[i - 1] in ['R', 'U', 'D']):
        pass
    elif i % 2 == 0 and (S[i - 1] in ['L', 'U', 'D']):
        pass
    else:
        flg = False
    if not flg:
        print('No')
        break
else:
    print('Yes')

Solution (Python):
s=input()
s_=list(s)
S=list(enumerate(s))
num=len(S)
empty=[]
for x,y in S:
    if (x%2==0 and (y=='R' or y=='U' or y=='D')) or (x%2==1 and (y=='L' or y=='U' or y=='D')):
        empty.append(y)
if empty==s_:
    print('Yes')
else:
    print('No')

Solution (Python):
import math
import sys
from collections import deque
import heapq
import copy
import itertools
from itertools import permutations
from itertools import combinations
import bisect
def mi() : return map(int,sys.stdin.readline().split())
def ii() : return int(sys.stdin.readline().rstrip())
def i() : return sys.stdin.readline().rstrip()
s=i()
for i in range(math.ceil(len(s)/2)):
  if not (s[2*i]=="R" or s[2*i]=="U" or s[2*i]=="D"):
    print("No")
    sys.exit()
for j in range(len(s)//2):
  if not (s[2*j+1]=="L" or s[2*j+1]=="U" or s[2*j+1]=="D"):
    print("No")
    sys.exit()
print('Yes')

Solution (Python):
S=input()

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

if flag:
    print('Yes')

Solution (Python):
S = input()
odds = []
evens = []
for i in range(len(S)):
    if i % 2 == 0:
        odds.append(S[i])
    else:
        evens.append(S[i])

if 'L' not in odds and 'R' not in evens:
    print('Yes')
else:
    print('No')

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
s = S()
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()
A = 'Yes'
for i in range(len(S)):
    if i%2==0 and S[i] == 'L':
        A = 'No'
    elif i%2 == 1 and S[i] == 'R':
        A = 'No'
print(A)

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

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

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

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

print('Yes')

Solution (Python):
import sys
S = list(input())
S.insert(0,"X")


for i in range(1,len(S),2):
  if S[i] == "L":
    print("No")
    sys.exit()

for j in range(2,len(S),2):
  if S[j] == "R":
    print("No")
    sys.exit()
print("Yes")

Solution (Python):
import sys
s=input()
l = len(s)
c=0
for i in range(l):
    if i%2==0:
        if s[i]=="R" or s[i]=="U" or s[i]=="D":
            continue
        else:
            c=1
            break
    if i%2==1:
        if s[i]=="L" or s[i]=="U" or s[i]=="D":
            continue
        else:
            c=1
            break
            
if c==1:
    print("No")
if c==0:
    print("Yes")

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

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

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


if __name__ == '__main__':
    solve()

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

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

Solution (Python):
import sys

S = input()

def check():
  for i in range(len(S)) :
    if i%2!=0 and S[i]=="R" :
      print("No")
      sys.exit(0)
    elif i%2==0 and S[i]=="L" :
      print("No")
      sys.exit(0)
check()
print("Yes")
sys.exit(0)

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

Solution (Python):
import sys
s=input()
cnt=0
for x in s:
  cnt+=1
  if x in ['U','D']:
    continue
  elif cnt %2 and x =='R':
    continue
  elif cnt%2==0 and x=='L':
    continue
  else:
    print('No')
    sys.exit()
print('Yes')

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

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

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

print(a)

Solution (Python):
s=input()
ki=['R','U','D']
gu=['L','U','D']
for i,num in enumerate(s,1):
	if i%2==1:
		if num not in ki:
			print('No')
			exit()
	else:
		if num not in gu:
			print('No')
			exit()
print('Yes')

Solution (Python):
import sys
L=list(input())
c=len(L)
for i in range(c):
  if i%2==0:
    if L[i]!="R" and L[i]!="D" and L[i]!="U":
      print("No")
      sys.exit()
  else:
    if L[i]!="L" and L[i]!="D" and L[i]!="U":
      print("No")
      sys.exit()
print("Yes")

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

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

Solution (Python):
import sys

S = list(input())
n = len(S)
for i in range(n) :
    if S[2*i] == "L" :
        print("No")
        sys.exit()
    if 2*i == n-1 :
        break
    if S[2*i+1] == "R" :
        print("No")
        sys.exit()
    if 2*i + 1 == n-1 :
        break
print("Yes")

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

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

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

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