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

odd_s = list(s[0::2])
even_s = list(s[1::2])

to = ['R', 'U', 'D']
te = ['L', 'U', 'D']

if set(odd_s).issubset(to) and set(even_s).issubset(te):
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

Odd = ["R", "U", "D"]
Even = ["L", "U", "D"]
S_l = len(S)
result = "Yes"

for i in range(0, S_l):
    if i % 2 == 0:
        if not S[i] in Odd:
            result = "No"
            break
    if i % 2 != 0:
        if not S[i] in Even:
            result = "No"
            break

print(result)

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

Solution (Python):
s = input()
n = len(s)
ans = 'Yes'
for i in range(n):
    if i%2 == 0:
        if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
            ans = 'Yes'
        else:
            print('No')
            exit()

    else:
        if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
            ans = 'Yes'
        else:
            print('No')
            exit()

print(ans)

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

Solution (Python):
S = input()

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

Solution (Python):
S = input()
point = 0
l = len(S)
i = 0
while i < l:
    if int(i % 2) == 1:
        if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
            point += 1
    else:
        if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
            point += 1
    i += 1

if point == l:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

s_odd = S[::2]
s_even = S[1::2]


def is_valid_str(s_list, valid_strs):
    for s in s_list:
        if s not in valid_strs:
            return False

    return True


even_ok = is_valid_str(s_even, ["L", "U", "D"])
odd_ok = is_valid_str(s_odd, ["R", "U", "D"])

if even_ok and odd_ok:
    print("Yes")
else:
    print("No")

Solution (Python):

s=str(input())

a=0
b=0

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

for i in range(len(s)):
    if i%2 != 0:
        if "R" in s[i]:
            b+=1


if a>0 or b>0:
    print("No")
else:
    print("Yes")

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

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

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

for i, s in enumerate(S):
  if i%2==0 and s not in odd:
    ans = "No"
    break
  elif i%2==1 and s not in even:
    ans = "No"
    break

print(ans)

Solution (Python):
s = [i for i in input()]
s_len = len(s)
list1 = []
list2 = []
for j in range(0, s_len, 2):
    for even in s[j]:
        list1.append(even in ['R', 'U', 'D'])
for k in range(1, s_len, 2):
    for odd in s[k]:
        list2.append(odd in ['L', 'U', 'D'])

if False in list1:
    print('No')
elif False in list2:
    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')
            exit()
    else:
        if s[i] == 'R':
            print('No')
            exit()
print('Yes')

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

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


for i in range(len(S)):
	if (i+1)%2==0 and S[i] in gusu:
		continue
	elif (i+1)%2!=0 and S[i] in kisu:
		continue
	else:
		print("No")
		exit()

print("Yes")

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

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

s = list(s)

odd_list = s[0::2]

even_list = s[1::2]

if "R" not in even_list and "L" not in odd_list:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
result = False
for s in S[::2]:
  if s not in 'RUD':
    break
else:
  for s in S[1::2]:
    if s not in 'LUD':
      break
  else:
    result = True
print('Yes' if result else 'No')

Solution (Python):
S = input()
judge = True
for n in range(len(S)):
  if n % 2 == 0:
    if S[n] not in ["R","U","D"]:
      judge = False
      break
  else:
    if S[n] not in ["L","U","D"]:
      judge = False
      break
if judge:
  print("Yes")
else:
  print("No")

Solution (Python):
word = input()
odd_v = ['R', 'U', 'D']
odd_list = []
even_v = ['L', 'U', 'D']
even_list = []

for index, i in enumerate(word, 1):
    if index % 2 == 1:
        odd_list.append(i)
    else:
        even_list.append(i)

if set(odd_list).issubset(odd_v) and set(even_list).issubset(even_v):
    print('Yes')
else:
    print('No')

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

Solution (Python):
def resolve():
    s = input()
    step_odd = 'RUD'
    step_even = 'LUD'
    ans = 'Yes'
    for i,j in enumerate(s):
        if i%2==0 and j not in step_odd:
            ans = 'No'
        elif i%2!=0 and j not in step_even:
            ans = 'No'
        else:
            pass
    print(ans)
resolve()

Solution (Python):
s = input()
o = ['R','U','D']
e = ['L','U','D']
ans = 'Yes'
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] not in o:
            ans = 'No'
    else:
        if s[i] not in e:
            ans = 'No'
print(ans)

Solution (Python):
def answer(s: str) -> str:
    for i, c in enumerate(s):
        if i % 2 == 0:
            if c == 'L':
                return 'No'
        else:
            if c == 'R':
                return 'No'

    return 'Yes'


def main():
    s = input()
    print(answer(s))


if __name__ == '__main__':
    main()

Solution (Python):
S = input()

answer = 'Yes'
for i in range(len(S)):

    if i % 2 == 0:
        if 'L' in S[i]:
            answer = 'No'
    else:
        if 'R' in S[i]:
            answer = 'No'

print(answer)

Solution (Python):
S = input()

print(("Yes", "No")["L" in S[::2] or "R" in S[1::2]])

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

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

ans = 'Yes'

for i in range(n):
    if i%2 == 0 and s[i] == 'L': ans = 'No'
    if i%2 != 0 and s[i] == 'R': ans = 'No'

print(ans)

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

Solution (Python):
S = list(input())
a = S[::2]
b = S[1::2]

if 'L' in a or 'R' in b:
    print('No')

else:
    print('Yes')

Solution (Python):
s = input()

L = ['R', 'U', 'D']
M = ['L', 'U', 'D']

lens = len(s)
cnt = 0

for i in range(lens):
    if (i+1)%2 == 1 and s[i] in L:
        cnt += 1
    elif (i+1)%2 == 0 and s[i] in M:
        cnt += 1

if cnt == lens:
    print('Yes')
else :
    print('No')

Solution (Python):
import sys
def LS2(): return list(sys.stdin.readline().rstrip())  


S = LS2()
N = len(S)
S1 = S[::2]
S2 = S[1::2]

r = sum(s in ['R','U','D'] for s in S1) + sum(s in ['L','U','D'] for s in S2)
print('Yes' if r == N else 'No')

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

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

Solution (Python):
N = str(input())
a = ['R','U','D']
b = ['L','U','D']
c = 0
for i in range(0, len(N)):
    if i % 2 == 0:
        if N[i] in a:
            c += 1

    else:
        if N[i] in b:
            c += 1


if c == len(N):
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()

ans = True

for c in s[0::2]:
    if c not in {'R', 'U', 'D'}:
        ans = False
        break

for c in s[1::2]:
    if c not in {'L', 'U', 'D'}:
        ans = False
        break

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

Solution (Python):
s = input()

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

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

Solution (Python):
S=input()

def ans141(S:str):
    judge=0

    for i in range(0,len(S)):
        if (i+1)%2==1:
            if S[i]=="R" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
        elif (i+1)%2==0:
            if S[i]=="L" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
    if judge>0:
        return "No"
    else:
        return "Yes"

print(ans141(S))

Solution (Python):
S=input()

def ans141(S:str):
    judge=0

    for i in range(0,len(S)):
        if (i+1)%2==1:
            if S[i]=="R" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
        else:
            if S[i]=="L" or S[i]=="U" or S[i]=="D":
                continue
            else:
                judge+=1
    if judge>0:
        return "No"
    else:
        return "Yes"

print(ans141(S))

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


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

print("Yes")

Solution (Python):
S = input()

a = {'R', 'U', 'D'}
b = {'L', 'U', 'D'}
Odd = set(S[0::2])
Even = set(S[1::2])

if Even <= b and Odd <= a:
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()

flug = True
for i, value in enumerate(S):
    if i % 2 == 0:
        if value == 'L':
            flug = False
    else:
        if value == 'R':
            flug = False
if flug:
    print("Yes")
else:
    print("No")

Solution (Python):
S=input()
for i in range(len(S)):
    if i%2==0:
        if S[i] not in "RUD":
            print("No")
            break
    else:
        if S[i] not in "LUD":
            print("No")
            break
else:
    print("Yes")

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

Solution (Python):
s = [c for c in input()]
result = 'Yes'
for index, step in enumerate(s, start=1):
    if index % 2 == 1:
        if step not in "RUD":
            result = 'No'
            break
    else:
        if step not in "LUD":
            result = 'No'
            break

print(result)

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

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

Solution (Python):
import sys
import math



input = sys.stdin.readline
 

def inp():
    return(int(input()))
def inara():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))



s=insr()

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

for i in range(1,len(s),2):
	if s[i]=='R':
		print("No")
		exit(0)

print("Yes")

Solution (Python):
S = input()
flag = 0
for i in range(1,len(S)+1):
    if i%2 == 1:
        if S[i-1] in 'RUD':
            continue
        else:
            flag =1
            print("No")
            break
    else:
        if S[i-1] in 'LUD':
            continue
        else:
            flag = 1
            print("No")
            break
if flag == 0:
    print("Yes")

Solution (Python):
S="*"+input()
N=len(S)-1

F=True
for i in range(1,N+1):
    if i%2==1:
        F&=S[i] in {"R","U","D"}
    else:
        F&=S[i] in {"L","U","D"}

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

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

Solution (Python):
s = input()

howmany = len(s)
judge = "Yes"

for x in range(howmany):
  if x % 2 == 0:
    if s[x] != "R" and s[x] != "U" and s[x] != "D":
      judge = "No"
      break
  else:
    if s[x] != "L" and s[x] != "U" and s[x] != "D":
      judge = "No"
      break
      
print(judge)

Solution (Python):

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

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

for i in range(len(s)):
    if  i%2==0:
        if s[i] not in odd:
            ans="No"
    else:
        if s[i] not in even:
            ans="No"

print(ans)

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

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

Solution (Python):
S = input()
 


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

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


ans = 'Yes'
for i in range(N):
  if (i % 2 == 0 and S[i] != 'R' and S[i] != 'U' and S[i] != 'D') or (i % 2 == 1 and S[i] != 'L' and S[i] != 'U' and S[i] != 'D'):
    ans = 'No'
    break
    
print(ans)

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

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

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

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

Solution (Python):
list_s = list(input())
for i in range(0, len(list_s)):
    if list_s[i] == 'U' or list_s[i] == 'D': continue
    elif (i % 2 == 0 and list_s[i] == 'R') or (i % 2 != 0 and list_s[i] == 'L'): continue
    else: print("No")
    exit()
print("Yes")

Solution (Python):
for i,s in enumerate(input(),start=1):
  if i%2==0:
    if s=='R':
      print('No')
      exit(0)
  else:
    if s=='L':
      print('No')
      exit(0)
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 = list(input())
ans = 'Yes'
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] == 'L':
            ans = 'No'
            break
    if i % 2 == 1:
        if S[i] == 'R':
            ans = 'No'
            break
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
else:
  print("Yes")

Solution (Python):
S = list(input())
flag = 0
for i in S:
  if flag == 0:
    if i == 'L':
      print("No")
      exit()
  else:
    if i == 'R':
      print("No")
      exit()
  flag = 1 - flag
print("Yes")

Solution (Python):



S = input()
Odd = S[::2]
Even = S[1::2]
print('Yes' if Odd.count('L') == 0 and Even.count('R') == 0 else 'No')

Solution (Python):
S = input()
flg = True
for i, s in enumerate(S):
    if i % 2 == 0:
        flg = flg & (s != 'L')
    elif i % 2 == 1:
        flg = flg & (s != 'R')
if flg:
    print('Yes')
else:
    print('No')

Solution (Python):
s = list(input())
for i in s[::2]:
    if i == 'L':
        print('No')
        exit()
for j in s[1::2]:
    if j == 'R':
        print('No')
        exit()
print('Yes')

Solution (Python):
s=input()
o="RUD"
e="LUD"
for i in range(0,len(s),2):
    if s[i] not in o:
        print("No")
        exit()
for i in range(1,len(s),2):
    if s[i] not in e:
        print("No")
        exit()
print("Yes")

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):
from sys import exit

S = input()
odd = set(['L','U','D'])
even = set(['R','U','D'])

for i in range(len(S)):
    if i%2 == 0:
        if S[i] not in even:
            print("No")
            exit(0)
    else:
        if S[i] not in odd:
            print("No")
            exit(0)

print("Yes")

Solution (Python):

S = input()

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

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

Solution (Python):
Odd = ["R","U","D"]
Even = ["L","U","D"]
match = 0

S = input()

for i in range(len(S)):
    if (i+1) % 2 == 0 and S[i] in Even:
        match += 1
    elif (i+1) % 2 == 1 and S[i] in Odd:
        match += 1

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

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

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

Solution (Python):
S = input()
is_easy = True

for i in range(len(S)):
    if i & 1 == 1 and S[i] == 'R':
        is_easy = False
        break
    if i & 1 == 0 and S[i] == 'L':
        is_easy = False
        break

print(['No', 'Yes'][is_easy])

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

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

Solution (Python):
a=input()
b=0
if (len(a))%2==0:
  for i in range(int(len(a)/2)):
    if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
    if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
  if b==len(a):
    print("Yes")
  else:
    print("No")
if (len(a))%2==1:
  for i in range(int(len(a)/2)+1):
    if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
  for i in range(int(len(a)/2)):
    if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
  if b==len(a):
    print("Yes")
  else:
    print("No")

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

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    S = input()

    def judge():
        for i in range(len(S)):
            if i % 2 == 0:
                if S[i] == "L":
                    return False
            else:
                if S[i] == "R":
                    return False
        return True

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


if __name__ == '__main__':
    main()

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

Solution (Python):
S = str(input())
 
Ans = True
for i in range(0, len(S)):
  if (i + 1) % 2 == 0:
    if S[i] != 'L' and S[i] != 'U' and S[i] != 'D':
      Ans = False
      break
  if (i + 1) % 2 == 1:
    if S[i] != 'R' and S[i] != 'U' and S[i] != 'D':
      Ans = False
      break
  
if Ans == False:
  print('No')
else:
  print('Yes')

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

print("Yes")

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

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

Solution (Python):
s = input()

ans = "Yes"

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

print(ans)

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

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

for i in range(len(S)):
  if i%2 == 0:
    if S[i] in kisu:
      c += 1
  else:
    if S[i] in gusu:
      c += 1
      

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

Solution (Python):
S = input()

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

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

Solution (Python):
S = input()

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

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

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


if __name__ == "__main__":
    main()

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

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

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

    print(ans)


if __name__ == "__main__":
    main()

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

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

Solution (Python):


s = input()
i = 1
res = True
for ch in s:
    if i % 2 == 1 and ch == 'L':
        res = False
        break
    elif i % 2 == 0 and ch == 'R':
        res = False
        break
    i += 1

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

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

for i in s[::2]:
    if i=='L':
        print('No')
        exit()

for i in s[1::2]:
    if i=='R':
        print('No')
        exit()

print('Yes')

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

for i in range(n):
  if i % 2 == 0 and s[i] == ("L"):
    flag = False
  if i % 2 == 1 and s[i] == ("R"):
    flag = False
    
if flag:
  print("Yes")
else:
  print("No")

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

Solution (Python):
s=input()

ans="Yes"


os=s[::2]

if "L" in os:
    ans="No"



es=s[1::2]

if "R" in es:
    ans="No"
    
print(ans)

Solution (Python):
s = input()
a = 1
f = 0
for i in s:
  if a == 1 and i == "L":
    print("No")
    f = 1
    break
  if a == 0 and i == "R":
    print("No")
    f = 1
    break
  a ^= 1
if f == 0:
  print("Yes")

Solution (Python):
def main():
    s = input()
    odds = ("R", "U", "D")
    even = ("L", "U", "D")
    ans = True
    for index, i in enumerate(s, 1):
        if index % 2 == 0 and not i in even:
            ans = False
        if index % 2 != 0 and not i in odds:
            ans = False

    print("Yes" if ans == True else "No")


main()

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

Solution (Python):


str = input()
table = list(str)
count = 0
for i in range(len(table)):
    if i % 2 == 0:
      if table[i] == 'R' or table[i] == 'U' or table[i] == 'D':
         count += 1
    elif i % 2 == 1:
      if table[i] == 'L' or table[i] == 'U' or table[i] == 'D':
         count += 1

if count == len(str):
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

Solution (Python):
a = ["R","U","D"]
b = ["L","U","D"]
s = input()
cnt = 0
for i in range(len(s)):
    if i%2==0:
        if s[i] in a:
            pass
        else:
            cnt = 1
            break
    else:
        if s[i] in b:
            pass
        else:
            cnt = 1
            break
if cnt == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()

ans='No'

for i,ss in enumerate(s):
  if i%2==0:
    if ss =='R' or ss=='U' or ss=='D':
      ans ='Yes'
    else:
      ans='No'
      break
  else:
    if ss=='L' or ss=='U' or ss=='D':
      ans='Yes'
    else:
      ans='No'
      break
print(ans)

Solution (Python):

s = input()
S = len(s)
for i in range(S):
    if i % 2:  
        if s[i] == "R":
            print("No")
            exit()
    else:
        if s[i]  == "L":
            print("No")
            exit()
print("Yes")

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

Solution (Python):
s=input()

cnt=0

for i in range(0,len(s),2):
  if s[i]=='L':
    cnt+=1

for i in range(1,len(s),2):
  if s[i]=='R':
    cnt+=1

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

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

s = input()
frag = True

for i, c in enumerate(s):
  if i%2 ==0:
    if c not in odd:
      frag = False
      break
  else:
    if c not in even:
      frag = False
      break

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

Solution (Python):
def f():
    s = input()
    for i in range(len(s)):
        if i%2 == 1:
            if s[i] == "L" or s[i] == "U" or s[i] == "D":
                continue
            else:
                return "No"
        else:
            if s[i] == "R" or s[i] == "U" or s[i] == "D":
                continue
            else:
                return "No"
    return "Yes"
print(f())

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

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

Solution (Python):
from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy


import heapq
sys.setrecursionlimit(10**6)

INF = 10**18
import bisect
import statistics
mod = 10**9+7


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