#include #define int long long using namespace std; int t,n; signed main(){ // freopen("path.in","r",stdin); // freopen("path.out","w",stdout); cin>>t; while(t--){ scanf("%lld",&n); while(n){ printf("%c",n%2==0?'R':'L'); n=(n-1)/2; } printf("\n"); } return 0; }