#include using namespace std; typedef signed long long ll; int main(void) { #ifdef DEBUG freopen("input.txt", "r", stdin); #endif ios_base::sync_with_stdio(false); cin.tie(NULL); int M; cin >> M; int A[M]; for (int i = 0; i < M; i++) { cin >> A[i]; } string ans; for (int i = 0; i < M; i++) { ans = ""; int ai = A[i]; while (ai > 0) { if (ai % 2) { ans += "L"; ai = (ai * 2 + 1) / 4; } else { ans += "R"; ai = (ai * 2 - 1) / 4; } } reverse(ans.begin(), ans.end()); cout << ans << endl; } return 0; }