// yukicoder: No.406 鴨等間隔の法則 // 2019.4.16 bal4u #include //// 高速入力 #if 1 #define gc() getchar_unlocked() #define pc(c) putchar_unlocked(c) #else #define gc() getchar() #define pc(c) putchar(c) #endif int in() // 非負整数の入力 { int n = 0, c = gc(); do n = 10 * n + (c & 0xf), c = gc(); while (c >= '0'); return n; } char s[20]; int main() { int m, A; char *p; m = in(); while (m--) { A = in(), p = s; while (A) { *p++ = (A & 1) ? 'L' : 'R'; A--, A >>= 1; } while (--p >= s) pc(*p); pc('\n'); } return 0; }