N = int(input()) A = [int(input()) + 1 for i in range(N)] for a in A: print("".join("LR"[int(i)] for i in (bin(a)[3:])))