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++) { StringBuilder tmp = new StringBuilder(); int x = sc.nextInt() + 1; while (x > 1) { if (x % 2 == 0) { tmp.append("L"); } else { tmp.append("R"); } x /= 2; } tmp.reverse(); sb.append(tmp).append("\n"); } System.out.print(sb); } }