m = int(input()) for _ in range(m): A = bin(int(input()) + 1)[3:] print(A.replace('0', 'L').replace('1', 'R'))