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

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



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

Solution (Python):
import sys

s = str(raw_input())

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

print("Yes")

Solution (Python):
S = input()
kisuu = S[::2]
guusuu = S[1::2]
hantei = []
ans = 0

for i in kisuu:
  if i == 'R' or i == 'U' or i == 'D':
    hantei.append('ok')
  else:
    hantei.append('no')

for j in guusuu:
  if j == 'L' or j == 'U' or j == 'D':
    hantei.append('ok')
  else:
    hantei.append('no')

ans = hantei.count('no')
if ans > 0:
  print('No')
else:
  print('Yes')

Solution (Python):
S = input()

S1 = S[0::2]
S2 = S[1::2]

if ("R" in S2) or ("L" in S1):
    print("No")
else:
    print("Yes")

Solution (Python):
S = input()
tap = 'Yes'
for i, j in enumerate(S):
  if j in ('U', 'D'):
    continue
  elif (i + 1) % 2 == 0 and j == 'L':
    continue
  elif (i + 1) % 2 == 1 and j == 'R':
    continue
  else:
    tap = 'No'
    break
    
print(tap)

Solution (Python):
def main():

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

if __name__ == "__main__":
    main()

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

Solution (Python):
def main():
  s = input()
  flag = True
  count = 1
  for i in s:
      if (count % 2 == 1) and ( i == 'L'):
          flag = False
          count += 1
      elif (count % 2 == 0) and (i == 'R'):
          flag = False
          count += 1
      else:
          count += 1
  if flag:
      print('Yes')
  else:
      print('No')
      
if __name__ == '__main__':
    main()

Solution (Python):
S = input()
S.split()

N = len(S)

for i in range(N//2):
    if (S[i*2] == 'R' or S[i*2] == 'U' or S[i*2] == 'D') and \
            (S[i*2 + 1] == 'L' or S[i*2 + 1] == 'U' or S[i*2 + 1] == 'D'):
        continue
    else:
        print('No')
        exit(0)
if N%2 != 0:
    if S[N-1] == 'R' or S[N-1] == 'U' or S[N-1] == 'D':
        print('Yes')
    else:
        print('No')
        exit(0)
else:
    print('Yes')

Solution (Python):
def resolve():
    s = input()
    if all(si in ["R", "U", "D"] for si in s[::2]) and all(si in ["L", "U", "D"] for si in s[1::2]):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    resolve()

Solution (Python):
S = list(input())
result = "Yes"
for i in  S[0::2]:
    if i == "L":
        result = "No"
for i in  S[1::2]:
    if i == "R":
        result = "No"

print(result)

Solution (Python):
S = input()
r = 'Yes'
for i, l in enumerate(S):
    p = 'LUD' if (i + 1) % 2 == 0 else 'RUD'
    if not l in p:
        r = 'No'
        break
print(r)

Solution (Python):
tap = input()
list = [str(i) for i in tap]
Even = list[1::2]
Odd = list[0::2]

if 'L' in Odd or 'R' in Even:
        print('No')
else:
        print('Yes')

Solution (Python):
S = input()
b = list(S)
a = b[0::2]
c = b[1::2]
d = len(a)
e = len(c)
cnt = 0
f = a.count('R')
g = a.count('U')
h = a.count('D')
i = f + g + h



j = c.count('L')
k = c.count('U')
l = c.count('D')
m = j + k + l



if i == d and m == e:
    print('Yes')
else:
    print('No')

Solution (Python):

S = list(input())
flag1 = 1
flag2 = 1
for i in range(len(S)):
    if i % 2 == 1:
        if S[i] != "L"and S[i] != "U"and S[i] != "D":
            flag1 = 0
            break
    else:
        if S[i] != "R"and S[i] != "U"and S[i] != "D":
            flag2 = 0
            break

if flag1 == 1 and flag2 == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input().strip()
P = S[0::2] 
Q = S[1::2]
P1 = str(P)
Q1 = str(Q)

result = []
P2 = 'L' in P1
Q2 = 'R' in Q1

if (P2 == True) or (Q2 == True):
    print('No')
else:
    print('Yes')

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

Solution (Python):
S = input()

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

if(ctr):
    print('Yes')

Solution (Python):
from sys import exit
a = input()

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

for i in range(len(a)):
    if (i+1) % 2 == 0:
        if a[i] not in odd:
            print("No")
            exit()
    elif (i+1) % 3 == 0 or i == 0:
        if a[i] not in p:
            print("No")
            exit()
    else:
        if a[i] not in p:
            print("No")
            exit()
print("Yes")

Solution (Python):
s = input()
c=0
for i in range(0,len(s),2):
    if s[i] in "RUD":
        c+=1
for i in range(1,len(s),2):
    if s[i] in "LUD":
        c+=1
if c==len(s):print("Yes")
else:print("No")

Solution (Python):
def _input():
    string = input()
    return list(string)

def is_easy_dance(movings):
    index = 0
    for i in movings:
        if index % 2 == 0:
            if i == 'R' or i == 'U' or i == 'D':
                pass
            else:
                return 'No'
        else:
            if i == 'L' or i == 'U' or i == 'D':
                pass
            else:
                return 'No'
        index += 1
        if index == len(movings):
            return 'Yes'

if __name__ == "__main__":
    movings = _input()
    print(is_easy_dance(movings))

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

checker = True
for i in range(len(S)):
    if i%2 == 0: 
        if S[i] == "L":
            print("No")
            checker = False
            break
    else:
        if S[i] == "R":
            print("No")
            checker = False
            break

if checker:
    print("Yes")

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

Solution (Python):
from sys import stdin

n = stdin.readline().rstrip()
cnt = 0
for i in range(len(n)):
    if i%2 == 0:
        if n[i] == "R" or n[i] == "U" or n[i] == "D":
            cnt+= 1
        else:
            print("No")
            exit()

    else:
        if n[i] == "L" or n[i] == "U" or n[i] == "D":
            cnt+=1
        else:
            print("No")
            exit()

print("Yes")

Solution (Python):
s = input()
num = 0
for i in s:
    if num % 2 == 0:
        if i in ["R", "U", "D"]:
            pass
        else:
            print("No")
            break
    else:
        if i in ["L", "U", "D"]:
            pass
        else:
            print("No")
            break
    num += 1
else:
    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+1)%2==1 and s[i]=="L") or ((i+1)%2==0 and s[i]=="R"):
    ans = "No"
    break
print(ans)

Solution (Python):
S = input()
flag = 0
char_num = len(S)
chk = char_num%2


for i in range(1,int(char_num/2)+1):
  
    if (S[i*2-1]=='R'):
        print('No')
        flag = 1
        break

            

if flag == 0:
    for i in range(int(char_num/2)):
       
        if (S[i*2]=='L'):
            print('No')
            flag = 1
            break
if chk == 1:  
   
    if flag == 0:
        if (S[-1]=='L'):
            print('No')
            flag = 1

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

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

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


    
if a == 1:
    print("No")

else:
    print("Yes")

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

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

Solution (Python):
s = input()

count = 0

even = []
odd = []
for i in range(len(s)):
    if i % 2 == 1:
        if s[i] == "R":
            count += 1
    if i % 2 == 0:
        if s[i] == "L":
            count += 1
            

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

Solution (Python):
S = input()
S_l = []
for i in range(len(S)):
    S_l.append(S[i:i+1])


E = [S_l[i] for i in range(len(S)) if i%2 == 1]
O = [S_l[i] for i in range(len(S)) if i%2 == 0]



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

ans = 0
for i in O:
    if i in odd:
        ans = ans
    else:
        ans += 1

for i in E:
    if i in even:
        ans = ans
    else:
        ans += 1

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

Solution (Python):
S = str(input())
length = len(S)
n = 0

while length > n:
  if n == 0 or n % 2 == 0:
    if S[n] == 'R' or  S[n] == 'U' or  S[n] == 'D':
      n += 1
      continue
    else:
      print("No")
      break
  else:
    if S[n] == 'L' or  S[n] == 'U' or  S[n] == 'D':
      n += 1
      continue
    else:
      print("No")
      break
if n == length:
  print("Yes")

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

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

Solution (Python):
def check(*a_list):
    ele_odd = len(a_list[0::2])
    ele_even = len(a_list[1::2])
    count = 0
    for i in a_list[0::2]:
        if i == "R":
            count += 1
        if i == "D":
            count += 1
        if i == "U":
            count += 1
    if count != ele_odd:
        return "No"

    count = 0
    for i in a_list[1::2]:
        if i == "L":
            count += 1
        if i == "D":
            count += 1
        if i == "U":
            count += 1
    if count != ele_even:
        return "No"
    return "Yes"


S = input()
print(check(*S))

Solution (Python):
input_line = input()
def check():
  num = 1
  for i in input_line:
      if num % 2 == 1 and i == 'L':
          return 'No'
          break
      elif num % 2 == 0 and i == 'R':
          return 'No'
          break
      elif num % 2 == 1 and i == 'R' or i == 'U' or i == 'D':
          pass
      elif num % 2 == 0 and i == 'L' or i == 'U' or i == 'D':
          pass
      num += 1

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

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

L_o = ['R','U','D']
L_e = ['L','U','D']
c = 0
l = len(s)

for i in range(l): 
    if i%2 ==0 : 
        for j in range(l):
            if 'L' in inp[i]: 
                print('No')
                exit() 
    elif i%2 ==1: 
        for k in range(3):
            if 'R' in inp[i]:
                print('No')
                exit()
print('Yes')

Solution (Python):
s = input()
ans = "Yes"
for i in range(0,len(s)):
    if(i % 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):
s=list(input())
odd = ["R","U","D"]
even = ["L", "U", "D" ]

frg = 0

for i in s[0::2]:
    if i in odd:         
        frg += 1

for i in s[1::2]:
    if i in even:
        frg += 1

if frg == len(s):
    print("Yes")
else:
    print("No")

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

bad_count = 0

for i in range(len(s)):
 
 
 
  if(i % 2 == 1):		
    if a[i] == "R":
      bad_count += 1
    
  else:
    if a[i] == "L":	
      bad_count += 1
    



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

Solution (Python):
S = input("")
S = list(S)
S_len = len(S)
S_even = []
S_odd = []
index_even = 0
index_odd = 1
while index_even < S_len:
    S_odd.append(S[index_even])
    index_even += 2
while index_odd < S_len:
    S_even.append(S[index_odd])
    index_odd += 2
count_L = S_odd.count("L")
count_R = S_even.count("R")
if count_L == 0 and count_R == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
odd = []
even = []
for i, c in enumerate(s):
  if i % 2 == 0:
    odd.append(c)
  else:
    even.append(c)
if "L" in odd or "R" in even:
  print("No")
else:
  print("Yes")

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

Solution (Python):
str = input()

list = list(str)

i = 0
f = True
for l in list:
    i+=1
    if i%2 != 0:
        if l == "L":
            f=False
            break
    else:
        if l == "R":
            f=False
            break

if(f):
    print("Yes",end="\n")
else:
    print("No",end="\n")

Solution (Python):
s = list(input())
if set(s[0::2]).issubset(['D', 'R', 'U']) and set(s[1::2]).issubset(['D', 'L', 'U']):
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()

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

print("No")

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

k = s[0::2]
g = s[1::2]

d = 0

for i in range(len(k)):
  if k[i] == "L":
    print("No")
    d = 1
    break

if d == 0:
  for i in range(len(g)):
    if g[i] == "R":
      print("No")
      d = 1
      break
if d == 0:
  print("Yes")

Solution (Python):
steps = list(str(input()))
kisu = ["R", "U", "D"]
gusu = ["L", "U", "D"]
flag = "Yes"

for n in range(len(steps)):
    
    if n % 2 != 1:
        if steps[n] in kisu:
            continue
        else:
            flag = "No"
            break
    
    else:
        if steps[n] in gusu:
            continue
        else:
            flag = "No"
            break

print(flag)

Solution (Python):
K=input()

def find(A):
    n=0
    for letter in A:
        n+=1
        if n%2==0:
            if A[n-1]=="R":
                return True
        if n%2==1:
            if A[n-1]=="L":
                return True

if find(K) ==True:
    print("No")
else :
    print("Yes")

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

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

Solution (Python):
odd=["R","U","D"]
even=["L","U","D"]
 
S=input()
 
k=0
for i in range(0,len(S),2):
  if S[i] not in odd:
    break
  else:
    k=k+1
 
for i in range(1,len(S),2):

  if S[i] not in even:

    break
  else:
    k=k+1
 
if k==len(S):
  print("Yes")
else:
  print("No")

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

ans = int(0)

for i in range(len(S)):
    if i%2 == 0 and S[i] == 'R' or S[i] == "U" or S[i] == 'D':
        ans += 1
        continue
    if i%2 == 1 and S[i] == 'L' or S[i] == "U" or S[i] == 'D':
        ans += 1
        continue
    else:
        break


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

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

Solution (Python):
S = input()

def judge() -> bool:
    for i in range(len(S)):
        if S[i] == 'U' or S[i] == 'D':
            continue
        elif (i+1) % 2 == 0 and S[i] != 'L':
            return False
        elif (i+1) % 2 == 1 and S[i] != 'R':
            return False
    return True

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

Solution (Python):
s = input()
ans = 1

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

Solution (Python):
S=input()
lS=list(S)
o=0
e=0

for i in range(len(lS)):
    if i % 2 == 0:
        if lS[i]=='R':
            e=e+1
        elif lS[i]=='U':
            e=e+1
        elif lS[i]=='D':
            e=e+1
    elif i % 2 == 1:
        if lS[i]=='L':
            o=o+1
        elif lS[i]=='U':
            o=o+1
        elif lS[i]=='D':
            o=o+1

if o+e==len(lS):
    print('Yes')
else:
    print('No')

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

for i in S:
  if counter%2 == 1:
    if i=="R" or i == "U" or i == "D":
      counter = counter + 1
    else:
      print("No")
      break
  else:
    if i=="L" or i == "U" or i == "D":
      counter = counter + 1
    else:
      print("No")
      break

if counter == len(S)+1:
  print("Yes")

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

Solution (Python):
S = input()

flag = False

for s in S[::2]:
    if s == 'L':
        flag = True

if not flag:
    for s in S[1::2]:
        if s == 'R':
            flag = True

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

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):
x = input()
count = 0
for i in range(len(x)):
  if i % 2 == 0:
    if x[i] == "R" or x[i] == "U" or x[i] == "D":
      count += 1
    else:
      print("No")
      break
  if i % 2 == 1:
    if x[i] == "L" or x[i] == "U" or x[i] == "D":
      count += 1
    else:
      print("No")
      break
if count == len(x):
  print("Yes")

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

Solution (Python):
letters = list(input())
result = 0
lengs = int(len(letters))
while True:
  if (result + 1) % 2 == 1 and letters[result] == "L":
    print("No")
    break
  elif (result + 1) % 2 == 0 and letters[result] == "R":
    print("No")
    break
  elif (result + 1) == lengs:
    print("Yes")
    break
  else:
    result += 1

Solution (Python):
S = input()

string = list(S)
judge = True

for i in range(1,len(string)+1):
    if string[i-1] == 'U' or string[i-1] == 'D':
        pass
    elif string[i-1] == 'L' and i % 2 == 0:
        pass
    elif string[i-1] == 'R' and i % 2 == 1:
        pass
    elif string[i-1] == 'R' and i == 1:
        pass
    else:
        judge = False
if judge == True:
    print('Yes')
elif judge == False:
    print('No')

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

Solution (Python):
s = input()
s_list =  list(s)
jun = 0
ans = 1

while(len(s_list)):
    if jun % 2 == 0:
        if s_list[jun] == "L":
            ans = 0
    if jun % 2 == 1:
        if s_list[jun] == "R":
            ans = 0
    jun += 1
    if jun == len(s_list):
      break
if ans == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
s = list(input())
ods = []
evs = []
ods = s[0::2]
evs = s[1::2]

cnt = 0
cnt2 = 0
youo = len(ods)        
youe = len(evs)
cnt += ods.count('R')
cnt += ods.count('U')         
cnt += ods.count('D')
  
cnt2 += evs.count('L')
cnt2 += evs.count('U')         
cnt2 += evs.count('D') 

if cnt == youo and cnt2 == youe:
  print('Yes')
else:
  print('No')

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

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] is "L":
                ans = "No"
        else:
            if S[i] is "R":
                ans = "No"
        if ans == "No":
            print(ans)
            exit()
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
S = list(input())
K = set()
G = set()
a = 0
flag = 0
for i in S:
  f = a % 2
  if f == 1:
    K.add(S[a])
  else:
    G.add(S[a])
  a += 1 
  
for k in K:
  if k == "R":
    flag = 1
    
for g in G:
  if g == "L":
    flag = 1
    
if flag == 1:
  print("No")
else:
  print("Yes")

Solution (Python):

s = list(input())
even = s[0::2]
odd = s[1::2]

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

Solution (Python):
s = input()
 
is_good = "Yes"
for i,string in enumerate(s):
  if i % 2 == 0 and string in ["R", "U", "D"]:
    continue
  elif i % 2 == 1 and string in ["L", "U", "D"]:
    continue
  else:
    is_good = "No"
    break
print(is_good)

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

ki = s[::2]
gu = s[1::2]

if ki.find("L")==-1 and gu.find("R")==-1:
    print("Yes")
else:
    print("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):

def detect_q2(step_list):
    for k,s in enumerate(step_list):

        if k % 2 == 0:
            if s == 'L':
                return False
        else:
            if s == 'R':
                return False

    return True


step = str(input())
step_list = list(step)


if detect_q2(step_list):
    print('Yes')
else:
    print('No')

Solution (Python):
if __name__ == '__main__':
    steps = str(input())

    index = 0

    correct = True

    for step in steps:
        
        if index % 2 == 0:
            if step == 'L':
                correct = False
        
        if index % 2 == 1:
            if step == 'R':
                correct = False
        index += 1

    if correct is True:
        print('Yes')
    else:
        print('No')

Solution (Python):
s = input()
safe = ['RUD', 'LUD']
easy = all(c in safe[i % 2] for i, c in enumerate(s))
print('Yes' if easy else 'No')

Solution (Python):
import re

s = input()
even_list = []
odd_list = []

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

for i in range(len(even_list)):
    if not re.match(r'[L,U,D]',even_list[i]):
        print("No")
        exit()

for i in range(len(odd_list)):
    if not re.match(r'[R,U,D]', odd_list[i]):
        print("No")
        exit()

print("Yes")

Solution (Python):


import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False


        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    s = lines[0]

    return (s, )


def solve(s, ):

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

        if i % 2 == 1:
            if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
                pass
            else:
                result = 'No'


    return result


def main():
    
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r)
    else:
        print("%s" % result)

if __name__ == '__main__':

    main()

Solution (Python):
s=str(input())
hantei0=True
hantei1=True

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

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

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

judge = 'Yes'

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

print(judge)

Solution (Python):
s = input()

flag = True

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

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

Solution (Python):
s = input()
if s=='L':
  print('No')
  exit()
for i in range(0,len(s),2):
  for j in range(1,len(s),2):
    if s[i] not in 'RUD' or s[j] not in 'LUD':
      print('No')
      exit()
print('Yes')

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]

S = input()
flag = True
count = 1

for s in S:
    if count % 2 == 1:
        if (s != 'R') and (s != 'U') and (s != 'D'):
            flag = False
            break
    if count % 2 == 0:
        if (s != 'L') and (s != 'U') and (s != 'D'):
            flag = False
            break
    count += 1

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

Solution (Python):



str = input().strip()
flag = True

for i in range(len(str)):
    if i % 2 == 0:
        if str[i] == 'L':
            flag = False
            break
    else:
        if str[i] == 'R':
            flag = False
            break
        
if flag:
    print("Yes")
else:
    print("No")

Solution (Python):
dance=input()
i=1
easydance=True
for dancestep in dance:
   if i%2==1:
       if dancestep=="L":
           easydance=False
   elif i%2==0:
       if dancestep=="R":
           easydance=False
   i+=1

if easydance==True:
    print("Yes")

else:
    print("No")

Solution (Python):
s = input()
Ls =len(s)
E = ""
O = ""

for i in range(Ls):
    if i%2 == 0:
        O = O + s[i]
    else:
        E = E + s[i]
Om = O.replace("L","")
Em = E.replace("R","")

if len(O)==len(Om) and len(E)==len(Em):
    ans = "Yes"
else:
    ans = "No"
print(ans)

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

Solution (Python):
import sys

input = sys.stdin.readline


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


if __name__ == '__main__':
    S = input()

    answer = solve(S.strip())
    print(answer)

Solution (Python):
s = input()

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

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

length = len(n)
flg = 0
for num in range(length):
    if (num+1)%2!=0:
        if n[num] == 'R' or n[num] == 'U' or n[num] == 'D':
            flg = 1
        else:
            flg = 0
            break
    else:
        if n[num] == 'L' or n[num] == 'U' or n[num] == 'D':
            flg = 1
        else:
            flg = 0
            break
if flg == 1:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

length = len(S)
evenN = []
oddN = []
for i in range(length):
    if (i + 1) % 2 == 0:
        if S[i] == 'R':
            evenN.append(False)
        else:
            evenN.append(True)
    if (i + 1) % 2 == 1:
        if S[i] == 'L':
            oddN.append(False)
        else:
            oddN.append(True)


if all(oddN) is True and all(evenN) is True:
    print('Yes')
else:
    print('No')

Solution (Python):


tap_pattern = input()
taps_odd = ["R", "U", "D"]
taps_even = ["L", "U", "D"]
easy = True

for i in range(1,len(tap_pattern)+1):
  if i%2 == 0:
    if tap_pattern[i-1] not in taps_even:
      easy = False
  elif i%2 != 0:
    if tap_pattern[i-1] not in taps_odd:
      easy = False

if easy == True:
  result = "Yes"
else:
  result = "No"
  
print(result)