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