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