#include #define int long long //#define USE_FREOPEN #define MUL_TEST #define FILENAME "path" using namespace std; void solve() { string s = ""; int x; cin >> x; x++; while (x > 1) { if (x & 1) s = 'R' + s; else s = 'L' + s; x >>= 1; } cout << s << '\n'; } signed main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); #ifdef USE_FREOPEN freopen(FILENAME ".in","r",stdin); freopen(FILENAME ".out","w",stdout); #endif int _ = 1; #ifdef MUL_TEST cin >> _; #endif while (_--) solve(); _^=_; return 0^_^0; }