N=int(input()) for i in range(N): n=int(input())+1 s=["LR"[c=='1'] for c in bin(n)[3:]] print("".join(s))