Buggy python submission (verdict: Runtime Error):
S = str(input())
odd = ""
even = ""
flag=0
for i in range(len(S)):
  if i % 2 == 0:
    odd += S[i]
  else:
    even += S[i]    
odd = list(set(odd))
even = list(set(even))

if len(odd) <= 3 and len(even) <= 3:
  for i in range(len(odd)):
    if (odd[i] == 'R') or (odd[i] == 'U') or (odd[i] == 'D'):
      pass
    else:
      flag=1
  for i in range(len(even)):
    if (odd[i] == 'L') or (odd[i] == 'U') or (odd[i] == 'D'):
      pass
    else:
      flag=1
  if flag==0:
    print('Yes')
  elif flag==1:
    print('No')
else:
  print('No')


Fixed submission:
S = str(input())
for i in range(len(S)):
  if i % 2 == 0:
    if S[i] == 'L':
      print('No')
      exit()
    else:
      pass
  else:
    if S[i] == 'R':
      print('No')
      exit()
    else:
      pass
print('Yes')

Buggy python submission (verdict: Runtime Error):
S = str(input())
odd = ""
even = ""
flag=0
for i in range(len(S)):
  if i % 2 == 0:
    odd += S[i]
  else:
    even += S[i]    
odd = list(set(odd))
even = list(set(even))
if len(odd) <= 3 and len(even) <= 3:
  for i in range(len(odd)):
    if (odd[i] == 'R') or (odd[i] == 'U') or (odd[i] == 'D'):
      pass
    else:
      flag=1
  for i in range(len(even)):
    if (odd[i] == 'L') or (odd[i] == 'U') or (odd[i] == 'D'):
      pass
    else:
      flag=1
  if flag==0:
    print('Yes')
  else:
    print('No')
else:
  print('No')


Fixed submission:
S = str(input())
for i in range(len(S)):
  if i % 2 == 0:
    if S[i] == 'L':
      print('No')
      exit()
    else:
      pass
  else:
    if S[i] == 'R':
      print('No')
      exit()
    else:
      pass
print('Yes')

Buggy python submission (verdict: Runtime Error):
S = str(input())
odd = ""
even = ""
flag=0
for i in range(len(S)):
  if i % 2 == 0:
    odd += S[i]
  else:
    even += S[i]    
odd = list(set(odd))
even = list(set(even))
if len(odd) <= 3 and len(even) <= 3:
  for i in range(len(odd)):
    if (odd[i] == 'R') or (odd[i] == 'U') or (odd[i] == 'D'):
      pass
    else:
      flag=1
  for i in range(len(even)):
    if (odd[i] == 'L') or (odd[i] == 'U') or (odd[i] == 'D'):
      pass
    else:
      flag=1
  if flag=0:
    print('Yes')
  else:
    print('No')
else:
  print('No')


Fixed submission:
S = str(input())
for i in range(len(S)):
  if i % 2 == 0:
    if S[i] == 'L':
      print('No')
      exit()
    else:
      pass
  else:
    if S[i] == 'R':
      print('No')
      exit()
    else:
      pass
print('Yes')

Buggy python submission (verdict: Runtime Error):
S = str(input())
odd = ""
even = ""
flag=0
for i in range(len(S)):
  if i % 2 == 0:
    odd += S[i]
  else:
    even += S[i]    
odd = list(set(odd))
even = list(set(even))
if len(odd) == 3 and len(even) == 3:
  for i in range(len(odd)):
    if (odd[i] == 'R') or (odd[i] == 'U') or (odd[i] == 'D'):
      pass
    else:
      flag=1
  for i in range(len(even)):
    if (odd[i] == 'L') or (odd[i] == 'U') or (odd[i] == 'D'):
      pass
    else:
      flag=1
  if flag=0:
    print('Yes')
  else:
    print('No')
else:
  print('No')


Fixed submission:
S = str(input())
for i in range(len(S)):
  if i % 2 == 0:
    if S[i] == 'L':
      print('No')
      exit()
    else:
      pass
  else:
    if S[i] == 'R':
      print('No')
      exit()
    else:
      pass
print('Yes')

Buggy python submission (verdict: Runtime Error):
S = str(input())
odd = ""
even = ""
flag=0
for i in range(len(S)):
  if i % 2 == 0:
    odd += S[i]
  else:
    even += S[i]    
odd = list(set(odd))
even = list(set(even))
if len(odd) == 3 and len(even) == 3:
  for i in range(len(odd)):
    if (odd[i] == 'R') or (odd[i] == 'U') or (odd[i] == 'D'):
      pass
    else:
      flag=1
  for j in range(len(even)):
    if (odd[i] == 'L') or (odd[i] == 'U') or (odd[i] == 'D'):
      pass
    else:
      flag=1
  if flag=0:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Fixed submission:
S = str(input())
for i in range(len(S)):
  if i % 2 == 0:
    if S[i] == 'L':
      print('No')
      exit()
    else:
      pass
  else:
    if S[i] == 'R':
      print('No')
      exit()
    else:
      pass
print('Yes')