Problem: There are n lanterns in a row. The lantern i is placed in position i and has power equal to p_i.

Each lantern can be directed to illuminate either some lanterns to the left or some lanterns to the right. If the i-th lantern is turned to the left, it illuminates all such lanterns j that j ∈ [i - p_i, i - 1]. Similarly, if it is turned to the right, it illuminates all such lanterns j that j ∈ [i + 1, i + p_i].

Your goal is to choose a direction for each lantern so each lantern is illuminated by at least one other lantern, or report that it is impossible.

Input

The first line contains one integer t (1 ≤ t ≤ 10000) — the number of test cases.

Each test case consists of two lines. The first line contains one integer n (2 ≤ n ≤ 3 ⋅ 10^5) — the number of lanterns.

The second line contains n integers p_1, p_2, ..., p_n (0 ≤ p_i ≤ n) — the power of the i-th lantern.

The sum of n over all test cases does not exceed 3 ⋅ 10^5.

Output

For each test case, print the answer as follows:

If it is possible to direct all lanterns so that each lantern is illuminated, print YES in the first line and a string of n characters L and/or R (the i-th character is L if the i-th lantern is turned to the left, otherwise this character is R) in the second line. If there are multiple answers, you may print any of them.

If there is no answer, simply print NO for that test case.

Example

Input


4
8
0 0 3 1 1 1 1 2
2
1 1
2
2 2
2
0 1


Output


YES
RRLLLLRL
YES
RL
YES
RL
NO

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define vi vector<int>
#define sz(x) (int)(x).size()
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
template<class T> bool cmn(T& a, T b) { return b < a ? a = b, true : false; }
template<class T> bool cmx(T& a, T b) { return b > a ? a = b, true : false; }
const int N = 3e5 + 10;
int dp[N], p[N], par[N], l_[N], f[N];
struct Node {
    int l, r, mx;
    Node operator + (const Node other) {
        if (l == -1) return other;
        if (other.l == -1) return *this;
        return Node{l, other.r, max(mx, other.mx)};
    }
} t[N * 4];
void build(int v, int l, int r) {
    if (l == r) {
        t[v] = {l, r, p[l] + l};
        return;
    }
    int m = (l + r) / 2;
    build(2 * v, l, m);
    build(2 * v + 1, m + 1, r);
    t[v] = t[2 * v] + t[2 * v + 1]; 
}
Node get(int v, int l, int r) {
    if (t[v].r < l || r < t[v].l) return {-1, -1};
    if (l <= t[v].l && t[v].r <= r) return t[v];
    return get(2 * v, l, r) + get(2 * v + 1, l, r);
}
int f_get(int pos) {
    int res = 1e9;
    while (pos >= 0) cmn(res, f[pos]), pos &= pos + 1, --pos;
    return res;
}
void clear(int n) {
    for (int i = 0; i <= n; i++) {
        int pos = i;
        while (pos < N) f[pos] = 1e9, pos |= pos + 1;
    }
}
void upd(int pos, int x) {
    while (pos < N) cmn(f[pos], x), pos |= pos + 1;
}
void solve() {
    int n;
    cin >> n;
    memset(dp, 0, (n + 1) * sizeof dp[0]);
    memset(par, -1, (n + 1) * sizeof par[0]);
    memset(l_, 0, (n + 1) * sizeof l_[0]);
    for (int i = 0; i < n; i++) cin >> p[i + 1];
    build(1, 0, n);
    clear(n);
    int ps = 0;
    upd(n, 0);
    for (int i = 1; i <= n; i++) {
        if (dp[ps] >= i) dp[i] = min(n, i + p[i]), par[i] = ps, l_[i] = 0;
        int l = max(0, i - p[i] - 1);
        int val = f_get(n - l);
        if (val != 1e9) {
            if (dp[i] < i - 1) l_[i] = 1, par[i] = val, dp[i] = i - 1;
            Node nd = get(1, val + 1, i - 1);
            cmn(nd.mx, n);
            if (dp[i] < nd.mx) {
                dp[i] = nd.mx;
                par[i] = val;
                l_[i] = 1;
            }
        }
        if (dp[i] > dp[ps]) ps = i;
        upd(n - dp[i], i);
    }
    int x = n;
    string ans(n, 'R');
    while (x > 0) {
        if (l_[x]) ans[x - 1] = 'L';
        x = par[x];
    }   
    if (dp[n] == n) cout << "YES\n" << ans << '\n';
    else cout << "NO\n";
}
int main() {
    ios::sync_with_stdio(0);
    cin.tie(0), cout.tie(0);
    int tt;
    cin >> tt;
    while (tt--) solve();
    return 0;
}