using System; using System.Collections.Generic; using System.Linq; class Program { static string ReadLine() { return Console.ReadLine(); } static int ReadInt() { return int.Parse(ReadLine()); } static int[] ReadInts() { return ReadLine().Split().Select(int.Parse).ToArray(); } static string[] ReadStrings() { return ReadLine().Split(); } static void Display (IEnumerable xs) { Console.WriteLine(string.Join(" ", xs)); } static string Calc(int x) { var ans = new List(); while (x > 0) { if (x % 2 == 0) { ans.Add("R"); } else { ans.Add("L"); } x = (x - 1) / 2; } return string.Join("", ans.Reverse<>()); } static void Main() { int n = ReadInt(); for (int i = 0; i < n; i++) { int x = ReadInt(); Console.WriteLine(Calc(x)); } } }