N = int(input()) for i in range(N): A_i = int(input()) ans = "" while 1: if A_i % 2 == 0: ans += "R" A_i -= 2 else: ans += "L" A_i -= 1 if A_i == 0: break A_i = A_i // 2 print(ans)