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') word = input() word input() input odd_v = ['R', 'U', 'D'] odd_v ['R', 'U', 'D'] 'R' 'U' 'D' odd_list = [] odd_list [] even_v = ['L', 'U', 'D'] even_v ['L', 'U', 'D'] 'L' 'U' 'D' even_list = [] even_list [] for index, i in enumerate(word, 1):
    if index % 2 == 1:
        odd_list.append(i)
    else:
        even_list.append(i) index i enumerate(word, 1) enumerate word 1 if index % 2 == 1:
        odd_list.append(i)
    else:
        even_list.append(i) index % 2 == 1 index % 2 index 2 1 odd_list.append(i) odd_list.append odd_list append i even_list.append(i) even_list.append even_list append i if set(odd_list).issubset(odd_v) and set(even_list).issubset(even_v):
    print('Yes')
else:
    print('No') set(odd_list).issubset(odd_v) and set(even_list).issubset(even_v) set(odd_list).issubset(odd_v) (odd_list).issubset (odd_list) set odd_list issubset odd_v set(even_list).issubset(even_v) (even_list).issubset (even_list) set even_list issubset even_v print('Yes') print 'Yes' print('No') print 'No' even_v = ['L', 'U', 'D'] ['L', 'U', 'D'] even_v odd_v = ['R', 'U', 'D'] ['R', 'U', 'D'] odd_v word = input() input() word even_list = [] [] even_list odd_list = [] [] odd_list
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')