import java.util.Scanner; public class No392 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int m = sc.nextInt(); for(int i = 0;i < m;i++) { StringBuilder route = new StringBuilder(); int a = sc.nextInt(); while(a != 0) { if(a % 2 == 0) { route.append("R"); a = a/2 - 1; }else { route.append("L"); a = a/2; } } System.out.println(route.reverse()); } } }