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

if (set(S[::2]) | set("RUD") == set("RUD")) and (set(S[1::2]) | set("LUD") == set("LUD")):
    print("Yes")
else:
    print("No")

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

Solution (Python):
s = input()

a = []
b = []

flag = 0

for i in range(len(s)):
    if i % 2 == 1:
        a.append(s[i])
    else:
        b.append(s[i])
        
for j in a:
    if j == 'R':
        flag += 1
        break
for k in b:
    if k == 'L':
        flag += 1
        break

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

Solution (Python):
S = input()

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

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

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

gu = list()
ki = list()
for i, s in enumerate(sin):
    if i % 2 == 0:
        ki.append(s)
    else:
        gu.append(s)

if set(ki) <= set(['R', 'U', 'D']):
    if set(gu) <= {'L', 'U', 'D'}:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
s = input()

good = [["R", "U", "D"], ["L", "U", "D"]]

for i, ele in enumerate(s):
	if ele not in good[i%2]:
		print("No")
		break
else:
	print("Yes")

Solution (Python):
str = input()
order = 1
symbol = True
for c in str:
    if order % 2 == 1:
        if c not in ['R', 'U', 'D']:
            print('No')
            symbol = False
            break
    else:
        if c not in ['L', 'U', 'D']:
            print('No')
            symbol = False
            break
    order += 1

if symbol:
    print('Yes')

Solution (Python):
inputval = input()
in2 = list (inputval)
result = 1
count = 0
for i in in2:
    count += 1
    if count%2 == 1:
        if i == 'L':
            result = result * 0
    if count%2 == 0:
        if i =='R':
            result = result * 0

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

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

test1 = ['R','U','D']
test2 = ['L','U','D']

isTapable = True

for i in range(len(S)):
    if i % 2 == 0:
        if S[i] in test1:
            isTapable = True
        else:
            isTapable = False
            break
    else:
        if S[i] in test2:
            isTapable = True
        else:
            isTapable = False
            break

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

Solution (Python):
string = input()

def jadge_humiyasui(string):
    label1 = True
    label2 = True

    for i, str in enumerate(string):
        if i % 2 == 0:
            if str not in ['R', 'U', 'D']:
                label1 = False
        else:
            if str not in ['L', 'U', 'D']:
                label2 = False

    if label1 & label2:
        print('Yes')
    else:
        print('No')

jadge_humiyasui(string)

Solution (Python):
def main():
    S = input()
    s_len = len(list(S))
    for i in range(s_len):
        s = S[i]
        ans = "Yes"
        if s == "U" or s == "D":
            pass
        else:
            if i % 2 == 0:
                if s == "R":
                    pass
                else:
                    ans = "No"
                    break
            else:
                if s == "L":
                    pass
                else:
                    ans = "No"
                    break
 
    print(ans)
if __name__ == '__main__':
    main()

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

ret = ""

for i in range(len(N)):
  if i%2 == 0:
    if N[i] == "R":
      ret = "Yes"
    elif N[i] == "U":
      ret = "Yes"
    elif N[i] == "D":
      ret = "Yes"
    else:
      ret = "No"
      break
  else:
    if N[i] == "L":
      ret = "Yes"
    elif N[i] == "U":
      ret = "Yes"
    elif N[i] == "D":
      ret = "Yes"
    else:
      ret = "No"
      break
      
print(ret)

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

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

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

Solution (Python):
import sys

step = input()
count = 0
judge = False

for char in step:
    count = count + 1
    if count % 2 == 1:
        if char == "R" or char == "U" or char =="D":
            judge = True
        else:
            print("No")
            sys.exit()
    elif count % 2 == 0:
        if char == "L" or char == "U" or char == "D":
            judge = True
        else:
            print("No")
            sys.exit()

if judge:
    print("Yes")

Solution (Python):
S = input()
num = len(S)
count = 0
step = list(S)
for i in range(num):
  if i % 2 == 0:
    if step[i] == 'R' or step[i] == 'U' or step[i] == 'D':
      count = count + 1
    else:
      print("No")
      break
  else:
    if step[i] == 'L' or step[i] == 'U' or step[i] == 'D':
      count = count + 1
    else:
      print("No")
      break
if count == num:
  print("Yes")

Solution (Python):
from sys import stdin

readline = stdin.readline


def main():
    s = readline().rstrip()
    UD = ('U', 'D')
    res = 'No'
    for i, c in enumerate(s):
        if c in UD:
            continue
        if i % 2 is 0:
            if c is 'L':
                break
        else:
            if c is 'R':
                break
    else:
        res = 'Yes'
    print(res)


if __name__ == '__main__':
    main()

Solution (Python):
i =input()

a=-1

for x in range(0,len(i)):
  if a==-1 and (i[x:x+1]!='R' and i[x:x+1]!='U' and i[x:x+1]!='D'):
    print('No')
    exit()
  if a==1 and (i[x:x+1]!='L' and i[x:x+1]!='U' and i[x:x+1]!='D'):
    print('No')
    exit()
  a*=-1
print('Yes')

Solution (Python):
s = input()
flag = True
flag2 = True
for char in s[::2]:
    if char =='L':
        flag = False
for char2 in s[1::2]:
    if char2 == 'R':
        flag2 = False
if (flag and flag2):
    print('Yes')
else:
    print('No')

Solution (Python):
oddStep = ['R', 'U', 'D']
evenStep = ['L', 'U', 'D']

S = input()
flag = True
for i,s in enumerate(S):
    if i % 2 != 0:
        if not s in evenStep:
            flag = False
            break
    else:
        if not s in oddStep:
            flag = False
            break

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

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

flag = False

for i in range(len(s)):

    if i % 2 == 0:
        if s[i] == "R" or s[i] == "U" or s[i] == "D":

            flag = True
        else:
            flag = False
            break
    elif i % 2 == 1:
        if s[i] == "L" or s[i] == "U" or s[i] == "D":

            flag = True
        else:
            flag = False
            break

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

Solution (Python):
is_easy = True
S = input()
for i in range(len(S)):
    if (i+1) % 2 == 0 and S[i] != "R":
        pass
    elif (i+1) % 2 == 1 and S[i] != "L":
        pass
    else:
        is_easy = False
        break

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

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

Solution (Python):

import sys

def main():
    a = list(input())

    for i, tap in enumerate(a):
        i = i + 1
        if i % 2 != 0:
            if tap == 'L':
                print('No')
                sys.exit()

        elif i % 2 == 0:
            if  tap == 'R':
                print('No')
                sys.exit()

    print('Yes')

if __name__ == '__main__' :
    main()

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

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

Solution (Python):
s = list(input())
l = len(s) - 1
for i,j in enumerate(s):
  if i % 2 == 1:
    if j == "L" or j == "U" or j == "D":
      if i == l:
      	print("Yes")
      continue
    else:
      print("No")
      break
  elif i % 2 == 0:
    if j == "R" or j == "U" or j == "D":
      if i == l:
      	print("Yes")
      continue
    else:
      print("No")
      break

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

Solution (Python):
s = input()
print('Yes' if all(s[i] in 'LUD' if i & 1 else s[i] in 'RUD' for i in range(len(s))) else 'No')

Solution (Python):
S = list(input())
ans = "Yes"
cnt = 0
for s in S:
    if s == "U" or s == "D":
        cnt += 1
        continue
    elif cnt % 2 == 0 and s == "L":
        cnt += 1
        ans = "No"
        break
    elif cnt % 2 == 1 and s == "R":
        cnt += 1
        ans = "No"
        break
    else:
        cnt += 1

print(ans)

Solution (Python):
S = input()
S1 = S[::2]
S2 = S[1::2]
f1=S1.find('L')
f2=S2.find('R')
if (f1==-1) and (f2==-1): print("Yes")
else:print("No")

Solution (Python):
import sys
 
stdin = sys.stdin
 
ni = lambda: str(ns())
ns = lambda: stdin.readline().rstrip()  

t1 = ni()
t1 = [t for t in t1]

result = "Yes"
for i, t in enumerate(t1) :
  if i % 2 == 0 :
    if t == "L" :
      result = "No"
      break
  else :
    if t == "R" :
      result = "No"
      break
print(result)

Solution (Python):
s = input()


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

Solution (Python):


l = []
for s in input():
    l.append(s)

a = ['R','U','D']
b = ['L','U','D']

ret = 'Yes'
for i in range(len(l)):
    if i % 2 == 0 and l[i] not in a:
        ret = 'No'
    elif i % 2 != 0 and l[i] not in b:
        ret = 'No'
    

print(ret)

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

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

Solution (Python):
S = list(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()

s = [c for c in s_]

even=[]
odd=[]
for i in range(len(s)):
  if i%2==0:
    odd.append(s[i])
  else:
    even.append(s[i])
    
even_=[i for i in even if i!="L" and i!="U" and i!="D"]
odd_=[i for i in odd if i!="R" and i!="U" and i!="D"]

if even_==[] and odd_==[]:
  print("Yes")
else:
  print("No")

Solution (Python):
st=input()
flag = 1
for i, s in enumerate(st):
  if i % 2 == 0:
    if s == 'R' or s == 'U' or s =='D':
      continue
    else:
      print('No')
      flag = 0
      break
  if i % 2 == 1:
    if s == 'L' or s == 'U' or s =='D':
      continue
    else:
      print('No')
      flag = 0
      break
if flag == 1:
  print('Yes')

Solution (Python):
s=input()
ans = "Yes"
for i in range(int(len(s)/2)):
  if s[i*2] == "L":
    ans = "No"
    break
    
  elif s[i*2+1] == "R":
    ans = "No"
    break
if len(s)%2 == 1:
  if s[-1] == "L":
    ans = "No"
print(ans)

Solution (Python):
S = input()

flag = False

for i in range(len(S)):
    if i % 2 == 1:
        if S[i] == 'R':
            flag = True
            break
    else:
        if S[i] == 'L':
            flag = True
            break
            
if flag == True:
    print('No')
else:
    print('Yes')

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

i = 0
RUD_NO = 0
while i < len(S):

    if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
        i = i + 2
    else:
        RUD_NO = 1
        break

LUD_NO = 0
i = 1
while i < len(S):

    if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
        i = i + 2
    else:
        LUD_NO = 1
        break

if LUD_NO == 0 and RUD_NO == 0:
    print('Yes')
    exit(0)

print('No')

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

print('Yes')

Solution (Python):
s=input()

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

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

Solution (Python):
s = input()
odd = s[::2]
even = s[1::2]
ans = 'Yes'
R = ['R','U','D']
L = ['L','U','D']
for i in odd:
    if i not in R:
        ans = 'No'
for i in even:
    if i not in L:
        ans = 'No'
print(ans)

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

Solution (Python):
n=input()
ans="Yes"
for j,i in enumerate(n):
    if j%2==1:
        if i!="L" and i!="U" and i!="D":
            ans="No"
    else :
        if  i!="R" and i!="U" and i!="D":
            ans ="No"
print(ans)

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

n = len(s)

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

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

print("Yes")

Solution (Python):
S = list(input())
list1 = []
list2 = []
for i in range(len(S)):
    if i % 2 == 0:
        list1.append(S[i])
    else:
        list2.append(S[i])
if not "L" in list1 and not "R" in list2:
    print("Yes")
else:
    print("No")

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

Solution (Python):
S=input()
l=len(S)
p=0
for i in range(l):
    if i%2==0:
        if S[i]=='R' or S[i]=='U' or S[i]=='D':
           p=p
        else:
            p+=1
    else:
        if S[i]=='L' or S[i]=='U' or S[i]=='D':
            p=p
        else:
            p+=1
if p>0:
    print('No')
else:
    print('Yes')

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

s = ns()

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):
S = list(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):
import sys

S = str(input())
Smax = len(S)

for i in range(0, Smax, 2) :
  if S[i] == "L" :
    print("No")
    sys.exit()
  else :
    continue

for i in range(1, Smax, 2) :
  if S[i] == "R" :
    print("No")
    sys.exit()
  else :
    continue

print("Yes")

Solution (Python):
S = input()
isEasy = True
for i, char in enumerate(S):
    if char == "L":
        if i % 2 == 1: continue
        else:
            isEasy = False
            break
    elif char == "R":
        if i % 2 == 0: continue
        else:
            isEasy = False
            break
judge = "Yes" if isEasy else "No"
print(judge)

Solution (Python):
a = str(input())
ans=0
i=0
for aa in a:
  i +=1
  if i%2 == 0:
    if  aa !='L' and aa !='U' and aa != 'D':
      ans=1
  else :
    if  aa !='R' and aa !='U' and aa != 'D':
      ans=1
if ans == 0 :
  print('Yes')
else:
  print('No')

Solution (Python):
S = input()

S_E = S[1::2]

S_O = S[::2]

S_E_ans = "R" in S_E

S_O_ans = "L" in S_O

if S_E_ans == 0 and S_O_ans == 0:
    print("Yes")
else:
    print("No")

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

Solution (Python):
S = input()
for i, c in enumerate(S):
    if (i & 1 == 0 and c == 'L') or (i & 1 and c == 'R'):
            print('No')
            break
else:
    print('Yes')

Solution (Python):
S = input()

cnt=1
flag=1



for s in S:
    if(cnt%2==0):

        if not(s=='L' or s=='U' or s=='D'):
            flag=0
        cnt+=1
    else:
        if not(s=='R' or s=='U' or s=='D'):

            flag=0
        cnt+=1

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

Solution (Python):
s = input()

flag = True


for i in range(len(s)):
    if((i+1)%2== 0):
        if(s[i] == 'L' or s[i] == 'U' or s[i] == 'D'):
            pass
        else:
            flag = False

    else:
        if(s[i] == 'R' or s[i] == 'U' or s[i] == 'D'):
           pass
        else:
            flag = False


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

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

Solution (Python):

def main():
    S  = input()
    O_flag = 0
    E_flag = 0
    for i in range(0, len(S),2):
        if S[i]!="R" and S[i]!="U" and S[i]!="D":
            O_flag = 1
            break
    for i in range(1, len(S),2):
        if S[i]!="L" and S[i]!="U" and  S[i]!="D":
            E_flag = 1
            break
    if O_flag ==1 or E_flag ==1:
        print("No")
    else:
        print("Yes")

if __name__ == '__main__':
    main()

Solution (Python):
s = list(input())
flag = True
for i, fs in enumerate(s):
    i += 1
    if not((i%2 == 0 and fs in ("L","U","D")) or (i%2 == 1 and fs in ("R","U","D"))):
        flag = False
if flag:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
s = input()
x = sorted(set(s[::2]))
y = sorted(set(s[1::2]))
countx = 0
county = 0
for i in x:
    if i in 'RDU':
        countx += 1
for i in y:
    if i in 'LDU':
        county += 1
print('Yes' if countx==len(x) and county==len(y) else 'No')

Solution (Python):
S=input()

s=1

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

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

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

for i in range(len(s)):
	if (i+1) % 2 != 0:
		if s[i] == "R" or s[i] == "U" or s[i] == "D":
			continue
		else:
			judge = False
			break
	else:
		if  s[i] == "L" or s[i] == "U" or s[i] == "D":
			continue
		else:
			judge = False
			break

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

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

even_list = ['R', 'U', 'D']
odd_list = ['L', 'U', 'D']

is_even = all(list(map(lambda x: x in even_list, S[0::2])))
is_odd = all(list(map(lambda x: x in odd_list, S[1::2])))

if is_even and is_odd:
    print('Yes')
else:
    print('No')

Solution (Python):
s=list(input())
k=[]
g=[]
kcount=0
gcount=0
for i in range(len(s)):
        if i%2==0:
                k.append(s[i])
                if s[i]=="R" or s[i]=="U" or s[i]=="D":
                        kcount+=1
        else:
                g.append(s[i])
                if s[i]=="L" or s[i]=="U" or s[i]=="D":
                        gcount+=1 

if len(k)==kcount and len(g)==gcount:
        print("Yes")
else:
        print("No")

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
s = input()
s_even = s[1::2]
s_odd = s[::2]

counter = 0
for i in s_odd:
    if i == 'R' or i == 'U' or i == 'D':
        counter +=1
for i in s_even:
    if i == 'L' or i == 'U' or i == 'D':
        counter +=1

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

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

Solution (Python):
S = input()

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

Solution (Python):
S = input()

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]]):
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
S = input()
O = set(S[::2])
E = set(S[1::2])
ans1 = [True if c in 'RUD' else False for c in O]
ans2 = [True if c in 'LUD' else False for c in E]
print('Yes' if False not in ans1 and False not in ans2 else 'No')

Solution (Python):
S=input()

even=[S[i] for i in range(len(S)) if i%2==0]
odd=[S[i] for i in range(len(S)) if i%2==1]

even=set(even)
odd=set(odd)



if even <= {"R","U","D"} and odd <= {"L","U","D"}:
    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
    elif i % 2 == 1:
        if S[i] == 'R':
            flag = 1

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

Solution (Python):
from sys import stdin

a = stdin.readline().rstrip()

b = ["R","U","D"]
c = ["L","U","D"]

for i in range(len(a)):
    if i % 2 == 0:
        if a[i] not in b:
            print("No")
            exit()      
    else:
        if a[i] not in c:
            print("No")
            exit() 
print("Yes")

Solution (Python):
import sys

S = input()

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


for o in odd:
    if o == "L":
        print("No")
        sys.exit()

for e in eve:
    if e == "R":
        print("No")
        sys.exit()

print("Yes")

Solution (Python):
s = input()
n = s[1::2]
o = s[::2]
cnt = 0
r = set(list("DRU"))
l = set(list("DLU"))
if set(o) | r == r: cnt+=1
if set(n) | l == l: cnt+=1
if cnt==2: print("Yes")
else: print("No")

Solution (Python):
S = input()

even = set(S[1::2])
odd = set(S[::2])


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

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

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


for i in range(len(s)):
    if i%2==0 and s[i] in odd:
        a=a
    elif i%2==1 and s[i] in even:
        a=a
    else:
        a="No"
        break

print(a)

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

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

Solution (Python):
S=input()

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

print('Yes')

Solution (Python):
s=input()

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

print('Yes')

Solution (Python):

S = input()
tmp = "U"
S = tmp + S
N = len(S)

for i in range(N):
    if i % 2 == 1:
        if S[i] == "R" or S[i] == "U" or S[i] == "D":
            continue
        else:
            print("No")
            exit()
    else:
        if S[i] == "L" or S[i] == "U" or S[i] == "D":
            continue
        else:
            print("No")
            exit()
else:
    print("Yes")

Solution (Python):
s = input()

flg = True
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] not in ['R', 'U', 'D']:
            flg = False
    else:
        if s[i] not in ['L', 'U', 'D']:
            flg = False

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

Solution (Python):
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import time
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
ts=time.time()
sys.setrecursionlimit(10**6)

show_flg=False


an=0
k=0
s=list(input())
n=len(s)
d=[['R','U','D'],['L','U','D']]
show(d[0],d[1])
for i in range(n):
    if s[i] in d[k]:
        show('OK')
    else:
        show('NG')
        an=1
    k=1-k
    
print(YN[an])

Solution (Python):
import numpy as np
step = input()
step = list(step)
a = 0


for i, j in enumerate(step):
  if (i+1)%2 == 0 and j == "R":
    a += 1
    print("No")
    break
  elif (i+1)%2 == 1 and j=="L":
    a +=1
    print("No")
    break

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

Solution (Python):
a=list(input())
ans=0
b=a[0::2]
c=a[1::2]
for i in range(len(b)):
  if b[i]!='L':
    ans+=1
for i in range(len(c)):
  if c[i]!='R':
    ans+=1
if ans==len(a):
  print('Yes')
else:
  print('No')

Solution (Python):
s=input()
i=0
a=""
while i<len(s):
  if s[i]=="L":
    a="No"
    break
  else:
    i+=2
if a=="No":
  pass
else:
  i=1
  while i<len(s):
    if s[i]=="R":
      a="No"
      break
    else:
      i+=2
if a=="":
  a="Yes"
print(a)

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

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

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


if __name__ == "__main__":
    test()

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

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

Solution (Python):
S = list(input())
a = len(S)
b = 0
c = 0
for i in range(a):
    if c==0:
        if b%2==0:
            b += 1
            if S[i]=="L":
                c += 1
        else:
            b += 1
            if S[i]=="R":
                c += 1

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

Solution (Python):
lis = list(input())
n=len(lis)

a = 0
for i in range(0,n,2):
  if lis[i] == "L":
    a+=1

for i in range(1,n,2):
  if lis[i] == "R":
    a+=1

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

Solution (Python):
import numpy as np

S = np.array(list(input()))

R = np.where(S == 'R')[0] + 1
L = np.where(S == 'L')[0] + 1

if (np.prod(R) % 2 == 1) * (np.sum(L % 2) == 0):
  print('Yes')
else:
  print('No')

Solution (Python):
S = input()

easy = True
for s in S[0::2]:
  if s == 'L':
    easy = False

for s in S[1::2]:
  if s == 'R':
    easy = False

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

Solution (Python):
s = input()

od = ["R","U","D"]
ev = ["L","U","D"]

b = False
for i in range(len(s)):
  if i%2==1 and (s[i] not in ev):
      b = True
      break
  elif i%2==0 and (s[i] not in od):
      b = True
      break

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

Solution (Python):
s = input()

for i, si in enumerate(s):
    if i%2==0 and (si=="R" or si=="U" or si=="D"):
        pass
    elif i%2==1 and (si=="L" or si=="U" or si=="D"):
        pass
    else:
        print("No")
        break
else:
    print("Yes")

Solution (Python):
import sys

s = list(input())

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

print('Yes')

Solution (Python):
s = input()

a = 1
ans = 1

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

Solution (Python):
s = input().strip()
s1 = ["R", "U","D"]
s2 = ["L","U","D"]

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

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

print("Yes")