m = int(input()) for i in range(m): a = int(input()) print(''.join(['LR'[int(c)] for c in bin(a + 1)[3:]]))