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;
template <typename T>
void readin(T &x) {
    x = 0;
    char ch = getchar();
    T fh = 1;
    for (; !isdigit(ch); ch = getchar()) if (ch == '-') fh = -1;
    for (; isdigit(ch); ch = getchar()) x = (x << 1) + (x << 3) + (ch ^ 48);
    x *= fh;
}
template <typename T>
void wt(T x) {
    if (x > 9) wt(x / 10);
    putchar(x % 10 + 48);
}
template <typename T>
void writeln(T x, char ch) {
    if (x < 0) {
        putchar('-');
        x = -x;
    }
    wt(x);
    putchar(ch);
}
const int N = 3e5 + 5;
int dp[N], p[N], n, las[N], q[N], hd, tl, lf[N], rf[N];
int work(int x) {
    int l = hd, r = tl, pos = -1;
    while (l <= r) {
        int mid = l + r >> 1;
        if (dp[q[mid]] >= x) {
            pos = mid;
            r = mid - 1;
        }
        else l = mid + 1;
    }
    if (pos != -1) return q[pos];
    else return -1;
}
int st[N][20], lim[N];
void build() {
    for (int i = 1; i <= n; i ++) {
        st[i][0] = rf[i];
    }
    for (int w = 1; w <= 19; w ++) {
        for (int i = 1; i <= n - (1 << w) + 1; i ++) {
            st[i][w] = max(st[i][w - 1], st[i + (1 << w - 1)][w - 1]);
        }
    }
    int id = 0;
    for (int i = 1; i <= n; i ++) {
        if (i == (1 << id + 1)) id ++;
        lim[i] = id;
    }
}
inline int ask(int x, int y) {
    return max(st[x][lim[y - x + 1]], st[y - (1 << lim[y - x + 1]) + 1][lim[y - x + 1]]);
}
char s[N];
bool sef[N];
int main() {
    int T;
    readin(T);
    while (T --) {
        readin(n);
        for (int i = 1; i <= n; i ++) readin(p[i]);
        for (int i = 1; i <= n; i ++) {
            lf[i] = max(1, i - p[i]);
            rf[i] = min(n, i + p[i]);
        }
        hd = tl = 1;
        q[1] = 0;
        build();
        int pos, val;
        for (int i = 1; i <= n; i ++) {
            pos = work(lf[i] - 1);
            if (pos == i - 1) {
                dp[i] = max(dp[i - 1], i - 1);
                las[i] = i - 1;
            }
            else if (pos == -1) {
                dp[i] = 0;
            }
            else {
                val = max(dp[pos], ask(pos + 1, i - 1));
                if (val > dp[i]) {
                    dp[i] = val;
                    las[i] = pos;
                }
            }
            if (dp[i - 1] >= i) {
                val = max(dp[i - 1], rf[i]);
                if (val > dp[i]) {
                    dp[i] = val;
                    las[i] = i - 1;
                    sef[i] = true;
                }
            }
            if (dp[i] > dp[q[tl]]) q[++ tl] = i;
            //cout << dp[i] << ' ';
        }
        //cout << endl;
        if (dp[n] != n) puts("NO");
        else {
            puts("YES");
            int id = n;
            while(id) {
                if (sef[id]) s[id] = 'R';
                else s[id] = 'L';
                for (int i = id - 1; i > las[id]; i --) s[i] = 'R';
                id = las[id];
            }
            for (int i = 1; i <= n; i ++) putchar(s[i]);
            puts("");
        }
        for (int i = 1; i <= n; i ++) {
            dp[i] = 0;
            sef[i] = false;
        }
    }
    return 0;
}