#include #include #include #include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int x, y; cin >> x; vector v(x); for (auto& i : v) { cin >> i; } string s; for (size_t i = 0; i < v.size(); i++) { y = v.at(i); while (y > 0) { if (y & 1) { s.push_back('L'); y = (y - 1) / 2; } else { s.push_back('R'); y = (y - 2) / 2; } } reverse(begin(s), end(s)); for (auto j : s) { cout << j; } cout << endl; s.clear(); } return 0; }