t=int(input()) for tests in range(t): a=int(input()) ANS=[] while a!=0: if a%2==0: ANS.append("R") else: ANS.append("L") a=(a-1)//2 print("".join(ANS[::-1]))