#include using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while (t--) { int n; cin >> n; string ans = ""; while (n != 0) { if (n & 1) { n--; n = n / 2; ans += 'L'; } else { n -= 2; n = n / 2; ans += 'R'; } } reverse(ans.begin(), ans.end()); cout << ans << endl; } }