for i in[0]*int(input()):print(''.join(['LR'[int(c)]for c in bin(int(input())+1)[3:]]))