import java.util.Scanner; import java.io.PrintWriter; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintWriter pw = new PrintWriter(System.out); int m = sc.nextInt(), a; for (int i = 0; i < m; ++i) { a = sc.nextInt(); String tmp = new String(); do { if (a % 2 == 0) { tmp += "R"; --a; } else tmp += "L"; a /= 2; } while (a != 0); StringBuffer ans = new StringBuffer(tmp); pw.println(ans.reverse()); } sc.close(); pw.close(); } }