import java.util.Arrays; import java.util.LinkedList; import java.util.Scanner; import java.util.TreeSet; public class Main { public static long MOD = 1000000007; public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int m = sc.nextInt(); for(int i = 0; i < m; i++){ StringBuilder sb = new StringBuilder(); int number = sc.nextInt(); while(number > 0){ final int prev = (number - 1) / 2; //System.out.println(prev + " -> " + number); if(prev * 2 + 1 == number){ sb.insert(0, 'L'); }else{ sb.insert(0, 'R'); } number = prev; } System.out.println(sb.toString()); } } }