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())
i = 1

for a in S:
    if i % 2 ==0:
        if a == "R":
            print("No")
            exit()
    else:
        if a == "L":
            print("No")
            exit()
    i += 1

print("Yes")

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

Solution (Python):
lst = list(input())
lst_ki = []
lst_gu = []

for i in range(len(lst)):
    if i%2==1:
        lst_gu+=lst[i]
    else:
        lst_ki+=lst[i]

ki = ["R","U","D"]
gu = ["L","U","D"]

for i in range(len(lst_gu)):
    if lst_gu[i] not in gu:
        print("No")
        exit()
for i in range(len(lst_ki)):
    if lst_ki[i] not in ki:
        print("No")
        exit()
print("Yes")

Solution (Python):
s = list(input())
easy = [
  {'R','U','D'},
  {'L','U','D'},
]
for i, ch in enumerate(s):
  if(ch in easy[i % 2]):
    continue
  else:
    print("No")
    exit()
print("Yes")

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

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

def judge(S):
    for i in range(len(S)):
        if i % 2 == 0 and S[i] == 'L':
            return 'No'
        elif i % 2 != 0 and S[i] == 'R':
            return 'No'
    return('Yes')

print(judge(S))

Solution (Python):
O = "RUD"
E = "LUD"

S = input()
f = 0
for i in range(len(S)):
  if i % 2:
    if S[i] in E:
      f += 1
  else:
    if S[i] in O:
      f += 1

if len(S) == f:
  print("Yes")
else:
  print("No")

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

Solution (Python):
S = raw_input()

ok = True

for i, c in enumerate(S):
    if i%2 == 1 and c == 'R': ok = False
    if i%2 == 0 and c == 'L': ok = False
if ok:
    print('Yes')
else:
    print('No')

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

s = input()[:-1]

even = set()
odd = set()

for i in range(0, len(s), 2):
    even.add(s[i])
for i in range(1, len(s), 2):
    odd.add(s[i])

print('Yes' if (len(odd - set(list('LUD'))) == 0) and (
    len(even - set(list('RUD'))) == 0) else 'No')

Solution (Python):
l=list(input())
n=len(l)
b=True
for i in range(1,1+n):
  if i%2==0:
    if l[i-1]=="R":
      b=False
  else:
    if l[i-1]=="L":
      b=False
if b:
  print("Yes")
else:
  print("No")

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

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

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

fl = True
fg = True
for i in range(len(s)):
    if (i+1)%2 == 1:
        if s[i] != "R" and s[i] != "U" and s[i] != "D":
            fl = False

    else:
        if s[i] != "L" and s[i] != "U" and s[i] != "D":
            fg = False

if fl and fg:
    print("Yes")
else:
    print("No")

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

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

Solution (Python):
def main():
    s = input()
    for i in range(len(s)):
        if (i+1) % 2 == 1:
            if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
                pass
            else:
                print('No')
                break
        else:
            if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
                pass
            else:
                print('No')
                break
    else:
        print('Yes')

    return 0;

if __name__ == "__main__":
    main()

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000)

def getN():
    return int(input())
def getList():
    return list(map(int, input().split()))
import math

s = input().strip()

for i, c in enumerate(s):
    if i % 2 == 0:
        if c == "L":
            print("No")
            sys.exit()
    else:
        if c == "R":
            print("No")
            sys.exit()

print("Yes")

Solution (Python):
s = input()

num = 0
kisu = {'R', 'U', 'D'}
guusu = {'L', 'U', 'D'}
result = True
for i in s:
    num += 1
    if ((num % 2) == 1) and (i in kisu):
        continue
    elif ((num % 2) == 0) and (i in guusu):
        continue
    else:
        result = False

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

Solution (Python):
S = input()

even_success = True
odd_success = True
for i in range(len(S)):
    c = S[i]
    
    if i % 2 != 0:
        
        if c not in ['L', 'U', 'D']:
            
            even_success = False
    else:
        
        if c not in ['R', 'U', 'D']:        
        
            
            odd_success = False

if even_success and odd_success:
    print('Yes')
else:
    print('No')

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

Solution (Python):
S = input()


o_moji = set(['R', 'U', 'D'])
e_moji = set(['L', 'U', 'D'])


if len(S) == 1:
    if S in o_moji:
        print('Yes')
        exit()
    else:
        print('No')
        exit()

odd = S[::2]
even = S[1::2]


for n in odd:
    if n in o_moji:
        continue
    else:
        print('No')
        exit()


for n in even:
    if n in e_moji:
        continue
    else:
        print('No')
        exit()

print('Yes')

Solution (Python):
def main():
  steps = raw_input()
  easy = True
  for i, c in enumerate(steps):
    if (i+1) % 2 == 0:
      if c not in ['L', 'U', 'D']:
        easy = False
        break
    else:
      if c not in ['R', 'U', 'D']:
        easy = False
        break
  print("Yes" if easy else "No")

main()

Solution (Python):
import sys





S = input()

for i,s in enumerate(S):
        ix = i+1
        if (ix % 2) != 0:
                if s == 'L':
                        print('No')
                        sys.exit()
        else:
                if s == 'R':
                        print('No')
                        sys.exit()
print('Yes')

Solution (Python):
steps = input()

odd_steps = [x for i, x in enumerate(steps) if i % 2 == 0]
even_steps = [x for i, x in enumerate(steps) if i % 2 == 1]

if "L" in odd_steps or "R" in even_steps:
  print("No")
else:
  print("Yes")

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

Solution (Python):
S = input()

p = 0

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

Solution (Python):
a = list(input())
flag = True
for i in range(len(a)):
    if i % 2 == 1:
        if a[i] == 'L' or a[i] == 'U' or a[i] == 'D':
            pass
        else:
            flag = False
    else:
        if a[i] == 'R' or a[i] == 'U' or a[i] == 'D':
            pass
        else:
            flag = False

if flag:
    ans = 'Yes'
else:
    ans = 'No'

print(ans)

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

Solution (Python):
import sys
INPUT = lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10 ** 9)


def main():
    S = INPUT()

    parity = True
    for s in S:
        if parity:
            if s == 'L':
                print('No')
                sys.exit()
            parity = False
        else:
            if s == 'R':
                print('No')
                sys.exit()
            parity = True

    print('Yes')


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys

S = 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')
      sys.exit()
  else:
    if S[i] != 'L' and S[i] != 'U' and S[i] != 'D':
      print('No')
      sys.exit()

print('Yes')

Solution (Python):
s = input()
for i, c in enumerate(s):
    if i % 2 == 0 and (c != 'R' and c != 'U' and c != 'D'):
        print('No')
        break
    elif i % 2 == 1 and (c != 'L' and c != 'U' and c != 'D'):
        print('No')
        break
else:
    print('Yes')

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

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

Solution (Python):
s = input()

s1 = set(s[::2])
s2 = set(s[1::2])

print("Yes" if ({'R', 'U', 'D'} | s1 == {'R', 'U', 'D'} and {'D', 'L', 'U'} | s2 == {'D', 'L', 'U'}) else "No")

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

Solution (Python):
S = input()

evenS=[]
oddS=[]

for i in range(len(S)):
    if i%2 == 0:
        oddS.append(S[i])
    else:
        evenS.append(S[i])

if('R' in evenS) or ('L' in oddS):
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()
cnt = 0
for i in range(0, len(S)):
    if ((i+1) % 2 == 1 and S[i] in ["R", "U", "D"]) or ((i+1) % 2 == 0 and S[i] in ["L", "U", "D"]):
        cnt += 1

if len(S) == cnt:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys

S = input()

evenNumber = ["D", "R", "U"]
oddNumber = ["L", "U", "D"]

for i, x in enumerate(S):
    if i%2 == 0:
        if x in evenNumber:
            continue

        else:
            print("No")
            sys.exit()

    else:
        if i%2 == 1:
            if x in oddNumber:
                continue

            else:
                print("No")
                sys.exit()

print("Yes")

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

tmp = 0

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

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

Solution (Python):
S = input()

kisuu = set(S[::2])
guusuu = set(S[1::2])

if 'L' in kisuu or 'R' in guusuu:
    print('No')
else:
    print('Yes')

Solution (Python):
s = input()

flag = 0
for i in range(len(s)):
	if (s[i] == "U" or s[i] == "D"):
		continue
	if (i % 2 == 0):
		if (s[i] == "R"):
			continue
	else:
		if (s[i] == "L"):
			continue
	flag = -1
	break
if (flag == 0):
	print("Yes")
else:
	print("No")

Solution (Python):
S = input()
j=0
for i in S:
  j+=1
  if j%2==0 and i == "R":
    print("No")
    break
  elif j%2==1 and i == "L":
    print("No")
    break
  elif j==len(S):
    print("Yes")
  else:
    continue

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

for i in s:
    if n%2==0:
        if i=="L" or i=="U" or i=="D":
            pass
        else:
            print("No")
            exit()
    else:
        if i=="R" or i=="U" or i=="D":
            pass
        else:
            print("No")
            exit()
    n+=1

print("Yes")

Solution (Python):
a=input()
lista=list(a)
j=1
listodd=['R','U','D']
listeven=['L','U','D']

for i in lista:
    if j%2==1:
        if i not in listodd:
            print('No')
            break
    elif j%2==0:
        if i not in listeven:
            print('No')
            break
    j=j+1
if j==len(lista)+1:
    print('Yes')

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

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

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

Solution (Python):
S = input()

for i,c in enumerate(S):
  if(i%2==1):
    if(c not in ["L","U","D"]):
      print("No")
      exit(0)
  else:
    if(c not in ["R","U","D"]):
      print("No")
      exit(0)

print("Yes")

Solution (Python):
s = input()

if 'L' in s[::2]:
  print('No')
elif 'R' in s[1::2]:
  print('No')
else:
  print('Yes')

Solution (Python):
S = input()
flag = 1
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] != "R" and S[i] != "U" and S[i] != "D":
            flag = 0
    elif i % 2 == 1:
        if S[i] != "L" and S[i] != "U" and S[i] != "D":
            flag = 0

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

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

flag = False

for idx, char in enumerate(S):
    if idx%2 == 0:
        if char in even:
            pass
        else:
            flag = True
            break
    else:
        if char in odd:
            pass
        else:
            flag = True
            break
        
if flag:
    print("No")
else:
    print("Yes")

Solution (Python):
S = input()

Judge = True
for i,s in enumerate(S):

    if i == 0:
        if s == "R" or s == "U" or s == "D":
            continue
        else:
            Judge = False
            
            break

    elif i % 2 == 0:
        if s == "R" or s == "U" or s == "D":
            continue
        else:
            Judge = False
            
            break

    else:
        if s == "L" or s == "U" or s == "D":
            continue
        else:
            Judge = False
            
            break

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

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

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

Solution (Python):
s = input()
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):
n = str(input())

ans = 'Yes'

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

print('Yes')

Solution (Python):
import sys
if __name__ == "__main__":
  s = input()
  for i in range(1, len(s)+1):
    if i % 2 == 0:
      if s[i-1] == "R":
        print("No")
        sys.exit()
    else:
      if s[i-1] == "L":
        print("No")
        sys.exit()

  print("Yes")

Solution (Python):
S = input()
ans = "Yes"
for i, s in enumerate(S):
    if i % 2 == 0: 
        if s == "L":
            ans = "No"
            break
    else:
        if s == "R":
            ans = "No"
            break

print(ans)

Solution (Python):



from sys import stdin
import math


str_list  = stdin.readline().rstrip()


kisu = ['R','U','D']
gusu = ['L','U','D']


for i in range(len(str_list)):
    
    if i % 2 == 0:
        if str_list[i] in kisu:
            pass
        else:
            ans='No'
            break

    else:
        if str_list[i] in gusu:
            pass
        else:
            ans='No'
            break
else:
    ans='Yes'

print(ans)

Solution (Python):
import sys

S = input()

for i, letter in enumerate(list(S)):
    if letter == 'U' or letter == 'D':
        continue
    
    if ((i+1) % 2 == 0 and letter == 'R') or ((i+1) % 2 == 1 and letter == 'L'):
        print('No')
        sys.exit()
print('Yes')

Solution (Python):
S = input()

for i in range(1,len(S)+1):
    if i % 2 == 1 and S[i-1] not in 'RUD':
        print('No')
        break
    if i % 2 == 0 and S[i-1] not in 'LUD':
        print('No')
        break
else:
    print('Yes')

Solution (Python):
import sys

mys = input()

list1 = ['R', 'U', 'D']
list2 = ['L', 'U', 'D']


mycnt = 1
 
for i in mys:
    if mycnt%2 != 0:
        if i not in list1:
            print('No')
            sys.exit()
    
    else:
        if i not in list2:
            print('No')
            sys.exit()
            
    mycnt += 1

print('Yes')

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

ans = 'Yes'
for n in range(N):
    if n%2==0 and S[n]=='L':
        ans = 'No'
    if n%2==1 and S[n]=='R':
        ans = 'No'
print(ans)

Solution (Python):
s = list(input())
s0 = set(s[::2])
s1 = set(s[1::2])
if 'L' in s0 or 'R' in s1:
    print('No')
else:
    print('Yes')

Solution (Python):
S = input()

for i in range(len(S)):
    if i % 2 != 0:
        if S[i] == "R":
            print("No")
            break

    else:
        if S[i] == "L":
            print("No")
            break

    if i == len(S) - 1:
        print("Yes")

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

Solution (Python):
from sys import stdin


def main():
    S = input()
    count = 1
    ans = 0

    for s in S:
        if count % 2 == 1:
            if s == "R" or s == "U" or s == "D":
                ans += 1
        else:
            if s == "L" or s == "U" or s == "D":
                ans += 1
        count += 1

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


if __name__ == "__main__":
    main()

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(S: str):
    flag = True
    strings_odd = ['R', 'U', 'D']
    strings_even = ['L', 'U', 'D']
    for i, s in enumerate(S):
        i = i + 1
        if i % 2 == 0:
            if s in strings_even:
                pass
            else:
                flag = False
        if i % 2 == 1:
            if s in strings_odd:
                pass
            else:
                flag = False
    if flag == True:
        print('Yes')
    else:
        print('No')
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):
S=input()
cond=0
for j in range(len(S)):
  if (j+1)%2==1 and S[j]=='L':
    cond=1
    break
  elif (j+1)%2==0 and S[j]=='R':
    cond=1
    break

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

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

Solution (Python):
S = input()
So = [S[i] for i in range(0, len(S), 2)]
Se = [S[i] for i in range(1, len(S), 2)]
anso = True
anse = True
for s in So:
    if s=="R" or s=="U" or s=="D":
        anso = True
    else:
        anso = False
        break
for s in Se:
    if s=="L" or s=="U" or s=="D":
        anse = True
    else:
        anse = False
        break
if anso and anse:
    print("Yes")
else:
    print("No")

Solution (Python):
import  sys

t = input()

for i in range(len(t)):
    if i % 2 == 0:
        if t[i] == "R" or t[i] == "U" or t[i] == "D":
            continue
        else:
            print("No")
            sys.exit()
    else:
        if  t[i] == "L" or t[i] == "U" or t[i] == "D":
            continue
        else:
            print("No")
            sys.exit()
print("Yes")

Solution (Python):
S = input()

odd_yes = True
for i in range(0, len(S), 2):
    if not S[i] in "RUD":
        odd_yes = False
        break

even_yes = True
for i in range(1, len(S), 2):
    if not S[i] in "LUD":
        even_yes = False
        break

if odd_yes and even_yes:
    print("Yes")
else:
    print("No")

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

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

print("Yes")

Solution (Python):
S = input()
for i, s in enumerate(S):
    if i % 2 == 1:
        if s not in "LUD":
            print("No")
            quit()
    else:
        if s not in "RUD":
            print("No")
            quit()
print("Yes")

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

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

Solution (Python):
S = input()

judgeodd = True
judgeeven = True

for i,s in enumerate(S):
    if (i + 1) % 2 == 0:
        if s == "R":
            judgeeven = False
    else:
        if s == "L":
            judgeodd = False

if judgeeven and judgeodd:
    print("Yes")
else:
    print("No")

Solution (Python):
def main():
    odd_move = ['R', 'U', 'D']
    even_move = ['L', 'U', 'D']

    move_list = [
        odd_move, even_move
    ]

    s = input()
    count = 0
    flag = True
    for c in s:
        if not (c in move_list[count]):
            flag = False
            break
        count = (count+1) % 2

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


if __name__ == "__main__":
    main()

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

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

Solution (Python):
s = input()
ans = True
for i in range(len(s)):
    if i % 2 == 0 and s[i] != 'R' and s[i] != 'U' and s[i] != 'D':
        ans = False
        break
    elif i % 2 == 1 and s[i] != 'L' and s[i] != 'U' and s[i] != 'D':
        ans = False
        break

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

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

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

Solution (Python):
s = list(map(str, input().split()))[0]
fumi = {0:["R","U","D"], 1:["L","U","D"]}
is_yasui = True
for i in range(len(s)):
    if s[i] not in fumi[i%2]:
        is_yasui = False
        break
        
if is_yasui:
    print("Yes")
else:
    print("No")

Solution (Python):
s = list(input())
for i,j in enumerate(s):
    if i % 2 == 0:
        if j in ['R','U','D']:
            continue
        print("No")
        exit()
    else:
        if j in ['L','U','D']:
            continue
        print("No")
        exit()
print('Yes')

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

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


if __name__ == "__main__":
    main()

Solution (Python):
s = input()

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

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

flg = True
for i in range(len(s)):
    if i % 2 != 0:
        if not s[i] in even:
            flg = False
            break
    else:
        if not s[i] in odd:
            flg = False
            break
if flg:
    print('Yes')
else:
    print('No')

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
S=input()
cnt=0

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

if cnt==len(S):
	print("Yes")
else:
	print("No")

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

flag = 0
for i in range(len(s)):
    if((i%2 == 1 and s[i] == "R") or (i%2 == 0 and s[i] == "L")):
        flag = 1
        break

ans = ["Yes","No"]
print(ans[flag])

Solution (Python):
from sys import stdin

def main():
    input = lambda: stdin.readline()[:-1]
    S = input()

    for i, s in enumerate(S, start=1):
        if i % 2:
            if s not in 'RUD':
                print('No')
                break
        else:
            if s not in 'LUD':
                print('No')
                break
    else:
        print('Yes')

main()

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

Solution (Python):
S = input()

is_odd = True
is_even = True

for i in range(len(S)):
    if (i+1) % 2 == 1:
        if S[i] == 'L':
            is_odd = False
    else:
        if S[i] == 'R':
            is_even = False

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

Solution (Python):
def p_b():
    S = input()

    f = True
    for i in range(len(S)):
        if i % 2 == 1:
            if S[i] == "R":
                f = False
        else:
            if S[i] == "L":
                f = False

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


if __name__ == '__main__':
    p_b()

Solution (Python):
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")
      exit()
  if(i%2 == 1):
    if(s[i] == "L" or s[i] == "U" or s[i] == "D"):
      continue
    else:
      print("No")
      exit()
print("Yes")

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

for ii in range(1,n+1):
    if ii % 2 != 0 and S[ii-1] == "L":
        print("No")
        break
    elif ii % 2 == 0 and S[ii-1] == "R":
        print("No")
        break
    if ii == n:
        print("Yes")

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

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

Solution (Python):
import sys
import math
from fractions import gcd





def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""


 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())


 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

S = list(sys.stdin.readline().rstrip())
ans = 'Yes'

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

print(ans)

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

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

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

flag=0
for i in list(set(odd)):
    if i not in ["R", "U", "D"]:
        flag=1

for i in list(set(even)):
    if i not in ["L", "U", "D"]:
        flag=1
if flag==0:
    print("Yes")
else:
    print("No")

Solution (Python):
S  = list(input())
index_even = ['R','U','D']
index_odd = ['L','U','D']
cnt_odd = 0
cnt_even = 0
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] in index_even:
            cnt_even += 1
    else:
        if S[i] in index_odd:
            cnt_odd += 1
if (cnt_even + cnt_odd) == len(S):
    print('Yes')
else:
    print('No')

Solution (Python):
def is_easy_steps(steps):
    if 'L' in steps[::2]:
        return "No"
    if 'R' in steps[1::2]:
        return "No"
    return "Yes"
print(is_easy_steps(input()))

Solution (Python):
S = input()

result = 0
for i in range(len(S)):
    if(i%2 == 0):
        if(S[i] == "L"):
            result = 1
            break
    elif(i%2 == 1):
        if(S[i] == "R"):
            result = 1
            break


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

Solution (Python):
inpl = lambda: list(map(int,input().split()))
easy_list = ['RUD','LUD']
S = input()
N = len(S)
for i in range(N):
    s = S[i]
    if s not in easy_list[i%2]:
        print('No')
        break
else:
    print('Yes')