#include using namespace std; #define int long long // <-----!!!!!!!!!!!!!!!!!!! #define rep(i,n) for (int i=0;i<(n);i++) #define rep2(i,a,b) for (int i=(a);i<(b);i++) #define rrep(i,n) for (int i=(n)-1;i>=0;i--) #define rrep2(i,a,b) for (int i=(b)-1;i>=(a);i--) #define all(a) (a).begin(),(a).end() typedef long long ll; typedef pair Pii; typedef tuple TUPLE; typedef vector V; typedef vector VV; typedef vector VVV; typedef vector> Graph; const int inf = 1e9; const int mod = 1e9 + 7; signed main() { std::ios::sync_with_stdio(false); std::cin.tie(0); int m; cin >> m; rep(i, m) { int x; cin >> x; string s = ""; while (x > 0) { s += (x % 2 ? "L" : "R"); x = (x - 1) / 2; } cout << s << endl; } }