m = gets.to_i A = m.times.map {gets.to_i} def f(a) if a == 1 "" else f(a / 2) + (a % 2 == 0 ? "L" : "R") end end C = A.map {|a| f(a + 1)} puts C