#include int main() { std::cin.tie(0); std::ios::sync_with_stdio(false); int m; std::cin >> m; int* dp = new int[m]; for (int i = 0; i < m; ++i) { std::cin >> dp[i]; } char path[10] = { 0 }; int size = 0; int t; for (int i = 0; i < m; ++i, size = 0, std::cout << std::endl) { while (dp[i]) { t = dp[i]; dp[i] = (dp[i] - 1) / 2; if (t == dp[i] * 2 + 1) { path[size] = 'L'; } else { path[size] = 'R'; } ++size; } while (size) { --size; std::cout << path[size]; } } }