#include #include #include using namespace std; using LL = long long; using ULL = unsigned long long; int main() { int m; cin >> m; map map; int A; for (int i = 0; i < m; i++) { cin >> A; string r; while (A) { if (A % 2 == 0) r += "R"; else r += "L"; A = (A - 1) / 2; } reverse(r.begin(), r.end()); cout << r << endl; } }