#include #include #include #include using namespace std; #define int long long #define rep(i,n) for(int i=0;i<(n);i++) #define pb push_back #define all(v) (v).begin(),(v).end() typedef vectorvint; typedef pairpint; typedef vectorvpint; signed main(){ int n;cin>>n; while(n--){ int a; cin>>a; vint lis; while(a){ lis.pb(a); a=(a-1)/2; } reverse(all(lis)); int cur=0; for(auto u:lis){ if(cur*2+1==u){ cout<<"R"; } else{ cout<<"L"; } cur=u; } cout<