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