#if __INCLUDE_LEVEL__ == 0 #include __BASE_FILE__ void solve() { ll N, M, K, a = 0, b = 0, c = 0; string S = "", T = ""; ll t; cin >> N; cin >> S; if (N == 1) { Yes(S[0] == 'x'); if (S[0] == 'x') { cout << "L" << '\n'; } return; } // Yes(1); vll X(N); X[0] = (S[0] == 'x'); rep(i, N - 1) { X[i + 1] = (S[i] != S[i + 1]); } rep(i, 2) { vll nX = X; if (i == 0) { T.push_back('L'); nX[1] ^= 1; } else T.push_back('R'); nX[0] ^= 1; reps(j, 1, N) { if (nX[j] == 1) { T.push_back('R'); nX[j] ^= 1; } else { T.push_back('L'); nX[0] ^= 1; if (j != N - 1) { nX[j + 1] ^= 1; } } } if (nX == vll(N, 0)) { Yes(1); cout << T << '\n'; return; } } Yes(0); } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << std::fixed << std::setprecision(20); int t = 1; // cin >> t; rep(_, t) solve(); } #elif __INCLUDE_LEVEL__ == 2 #elif __INCLUDE_LEVEL__ == 1 #pragma once #pragma GCC optimize("unroll-loops") #include #include using namespace std; using namespace atcoder; using ll = long long; using ld = long double; using Graph = vector >; using vi = vector; using vl = vector; using vll = vector; using vb = vector; using vvi = vector; using vvl = vector; using vvb = vector; using vvvb = vector; using vvll = vector; using vvvll = vector; using vvvvll = vector; using vvvvvll = vector; using vd = vector; using vvd = vector; using vvvd = vector; using vld = vector; using vvld = vector; using vvvld = vector; using vc = vector; using vvc = vector; using vs = vector; using pii = pair; using mint = modint1000000007; #define reps(i, a, n) for (ll i = (a); i < (ll)(n); i++) #define rep(i, n) for (ll i = (0); i < (ll)(n); i++) #define rrep(i, n) for (ll i = (1); i < (ll)(n + 1); i++) #define repd(i, n) for (ll i = n - 1; i >= 0; i--) #define rrepd(i, n) for (ll i = n; i >= 1; i--) #define ALL(n) n.begin(), n.end() #define rALL(n) n.rbegin(), n.rend() #define fore(i, a) for (auto& i : a) #define IN(a, x, b) (a <= x && x < b) #define IN(a, x, b) (a <= x && x < b) #define INIT \ std::ios::sync_with_stdio(false); \ std::cin.tie(0); #pragma once template // [0,M)についての階上を求める vector KAI(int M) { vector kai(M, 1); rep(i, M - 1) { kai[i + 1] = kai[i] * (i + 1); } return kai; } template vector DIV(int M) { vector kai = KAI(M), div(M, 1); div.back() /= kai.back(); for (int i = M - 2; i >= 0; --i) { div[i] = div[i + 1] * (i + 1); } return div; } long long Power(long long a, long long b, long long m) { long long p = a, Answer = 1; p %= m; while (b > 0) { if (b & 1) { Answer *= p; Answer %= m; } p = (p * p) % m; b /= 2; } return Answer; } // a ÷ b を m で割った余りを返す関数え long long Division(long long a, long long b, long long m) { return (a * Power(b, m - 2, m)) % m; } template void output(T& W, bool x) { cout << W; if (!x) cout << ' '; else cout << endl; return; } // sは改行するか否かを表す template void output(vector& W, bool s) { rep(i, W.size()) { output(W[i], ((i == W.size() - 1) || s)); } return; } // sは改行するか否かを表す template void output(vector >& W, bool s) { rep(i, W.size()) { output(W[i], s); } return; } template T vectorsum(vector& W, int a, int b) { return accumulate(W.begin() + a, W.end() + b, (T)0); } template T vectorsum(vector& W) { int b = W.size(); return accumulate(ALL(W), (T)0); } template inline T CHMAX(T& a, const T b) { return a = (a < b) ? b : a; } template inline T CHMIN(T& a, const T b) { return a = (a > b) ? b : a; } template void input(T& W) { cin >> W; return; } template void input(vector& W) { for (auto& u : W) input(u); return; } template void add(T& W, TT& a) { W += a; return; } template void add(vector& W, vector& a) { rep(i, W.size()) add(W[i], a[i]); } template void add(T& W, T& a) { W += a; } template void add(vector& W, TT a) { for (auto& u : W) add(u, a); return; } vll dx = {1, -1, 0, 0}, dy = {0, 0, 1, -1}; void Yes(bool b) { if (b) cout << "Yes" << '\n'; else cout << "No" << '\n'; } struct TRI { ll a; ll b; ll c; ll d; }; bool operator>(const TRI& r, const TRI& l) { return (r.a > l.a || (r.a == l.a && r.b > l.b) || (r.a == l.a && r.b == l.b && r.c > l.c)); } bool operator<(const TRI& r, const TRI& l) { return (r.a < l.a || (r.a == l.a && r.b < l.b) || (r.a == l.a && r.b == l.b && r.c < l.c)); } struct TRK { ll a; ll b; ll c; }; bool operator>(const TRK& r, const TRK& l) { return (r.a > l.a || (r.a == l.a && r.b > l.b) || (r.a == l.a && r.b == l.b && r.c > l.c)); } bool operator<(const TRK& r, const TRK& l) { return (r.a < l.a || (r.a == l.a && r.b < l.b) || (r.a == l.a && r.b == l.b && r.c < l.c)); } std::random_device rnd; std::mt19937 mt(rnd()); default_random_engine engineX(rnd()); // 平均0.0、標準偏差1.0で分布させる std::normal_distribution<> seikidist(0.0, 1.0); template // 0以上K未満の整数を等確率で発生させる long long randomX(T K) { uniform_int_distribution select(0, K - 1); return select(mt); } template vector dycstra(vector > > G, ll N, ll K) { vb kaku(N, false); vector cur(N, 1e18); cur[K] = 0; priority_queue, vector >, greater > > Q; Q.push(make_pair(cur[K], K)); while (!Q.empty()) { ll pos = Q.top().second; Q.pop(); if (kaku[pos]) continue; kaku[pos] = true; for (ll i = 0; i < G[pos].size(); i++) { ll nex = G[pos][i].first; T cost = G[pos][i].second; if (cur[nex] > cur[pos] + cost) { cur[nex] = cur[pos] + cost; Q.push(make_pair(cur[nex], nex)); } } } return cur; } __int128_t Power(__int128_t a, __int128_t b, __int128_t m) { __int128_t p = a, Answer = 1; for (int i = 0; i < 63; i++) { __int128_t wari = (1LL << i); if ((b / wari) % 2 == 1) { Answer %= m; Answer = (Answer * p) % m; // 「a の 2^i 乗」が掛けられるとき } p %= m; p = (p * p) % m; } return Answer; } // ミラーラビン素数判定法(10**18以下の素数までなら判定可能) bool is_prime(long long N) { if (N <= 1) return false; if (N == 2 || N == 3) return true; if (N % 2 == 0) return false; vector A = {2, 325, 9375, 28178, 450775, 9780504, 1795265022}; long long s = 0, d = N - 1; while (d % 2 == 0) { ++s; d >>= 1; } for (auto a : A) { if (a % N == 0) return true; long long t, x = Power(a, d, N); if (x != 1) { for (t = 0; t < s; ++t) { if (x == N - 1) break; x = __int128_t(x) * x % N; } if (t == s) return false; } } return true; } #endif