n=int(input()) for _ in[0]*n: a=int(input()) s="" while a: s+="L"if a%2 else"R" a=~-a//2 print(s[::-1])