for _ in range(int(input())): a = int(input()) ans = '' a += 1 while a > 1: if a % 2 == 1: ans = 'R' + ans else: ans = 'L' + ans a //= 2 print(ans)