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