import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < n; i++) { int x = sc.nextInt(); StringBuilder tmp = new StringBuilder(); while (x > 0) { if (x % 2 == 0) { x--; tmp.append("R"); } else { tmp.append("L"); } x /= 2; } sb.append(tmp.reverse()).append("\n"); } System.out.print(sb); } }