#include #include #include using namespace std; int main() { int m; cin >> m; while (m--) { int a; cin >> a; a++; string res = ""; while (a != 1) { res += "LR"[a % 2]; a >>= 1; } reverse(res.begin(), res.end()); cout << res << endl; } return 0; }