import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(), k; String s; for (int i = 0; i < n; i++) { k = sc.nextInt(); s = ""; while (k > 0) { if (k % 2 == 1) { s = "L" + s; } else { s = "R" + s; } k = (k - 1) / 2; } System.out.println(s); } } }