c = input()
rigth = ['O', 'P', 'K', 'L']

if c in rigth:
    print('Right')
else:
    print('Left')

c = input()
rigth = ['O', 'P', 'K', 'L']

if c in rigth:
    print('Right')
else:
    print('Left')
