# -*- coding: utf-8 -*-

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