#include using namespace std; signed main(){ int M; cin >> M; for( int i = 0; i < M; ++i ){ string ans; int A; cin >> A; while( A ) ans += "LR"[ A & 1 ], A >>= 1; reverse( ans.begin(), ans.end() ); cout << ans << endl; } return 0; }