def f(n): if n != 0: f((n - 1) // 2) print("R" if n % 2 == 0 else "L", end="") n = int(input()) for i in range(n): a = int(input()) b = f(a) print()