Problem: 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.

Submission attempts (in order):
hoge = input().split()
while i < range(len(hoge)):
  if i%2==0 and hoge[i] == 'L' or 'D' or 'U':
    pass
  elif i%2==1 and hoge[i] == 'R' or 'D' or 'U':
    pass
  else:
    break
  i+=1
if i == len(hoge):
  print('Yes')
else:
  print('No')

hoge = input().split()
i = 0
while i < range(len(hoge)):
  if i%2==0 and hoge[i] == 'L' or 'D' or 'U':
    pass
  elif i%2==1 and hoge[i] == 'R' or 'D' or 'U':
    pass
  else:
    break
  i+=1
if i == len(hoge):
  print('Yes')
else:
  print('No')

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

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

hoge = input().strip()
int i = 0
while i < range(len(hoge)):
  if i%2==0 and hoge[i] == 'L' or 'D' or 'U':
    pass
  elif i%2==1 and hoge[i] == 'R' or 'D' or 'U':
    pass
  else:
    break
  i+=1
if i == len(hoge):
  print('Yes')
else:
  print('No')

hoge = input().split()
i = 0
while i < len(hoge):
  if i%2==0 and hoge[i] == ('R' or 'D' or 'U'):
    pass
  elif i%2==1 and hoge[i] == ('L' or 'D' or 'U'):
    pass
  else:
    break
  i+=1
if i == len(hoge):
  print('Yes')
else:
  print('No')

hoge = list(input())
i = 0
while i < len(hoge):
  if i%2==0 and hoge[i] == ('R' or 'D' or 'U'):
    pass
  elif i%2==1 and hoge[i] == ('L' or 'D' or 'U'):
    pass
  else:
    break
  i+=1
if i+1 == len(hoge):
  print('Yes')
else:
  print('No')

hoge = input().split
while i < range(len(hoge)):
  if i%2==0 and hoge[i] == 'L' or 'D' or 'U':
    pass
  elif i%2==1 and hoge[i] == 'R' or 'D' or 'U':
    pass
  else:
    break
  i+=1
if i == len(hoge):
  print('Yes')
else:
  print('No')

hoge = input().split()
i = 0
while i < range(len(hoge)):
  if i%2==0 and hoge[i] == ('R' or 'D' or 'U'):
    pass
  elif i%2==1 and hoge[i] == ('L' or 'D' or 'U'):
    pass
  else:
    break
  i+=1
if i == len(hoge):
  print('Yes')
else:
  print('No')

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

hoge = input().split()
i = 0
while i < len(hoge):
  if i%2==0 and hoge[i] == ('L' or 'D' or 'U'):
    pass
  elif i%2==1 and hoge[i] == ('R' or 'D' or 'U'):
    pass
  else:
    break
  i+=1
if i == len(hoge):
  print('Yes')
else:
  print('No')

hoge = input().split()
i = 0
while i <= len(hoge):
  if i%2==0 and hoge[i] == ('L' or 'D' or 'U'):
    pass
  elif i%2==1 and hoge[i] == ('R' or 'D' or 'U'):
    pass
  else:
    break
  i+=1
if i == len(hoge):
  print('Yes')
else:
  print('No')

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

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Accepted