import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int m = scan.nextInt(); int[]A = new int[m]; for(int i = 0; i < m; i++) { A[i] = scan.nextInt(); } scan.close(); StringBuilder[] sb = new StringBuilder[m]; for(int i = 0; i < m; i++) { int t = A[i]; sb[i] = new StringBuilder(); while(t != 0) { if(t % 2 == 0) { sb[i].append("R"); t = t / 2 - 1; }else { sb[i].append("L"); t = t / 2; } } } for(int i = 0; i < m; i++) { System.out.println(sb[i].reverse().toString()); } } }