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>
#include"map"
#include"string"
#include"cmath"
#include"cstdio"
#include"iostream"
#include"cstring"
#include"algorithm"
#include"vector"
//#pragma GCC optimize(3, "Ofast")
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
inline int read() {
    int s = 0, w = 1;
    char ch = getchar();
    while (ch < '0' || ch>'9') { if (ch == '-')w = -1; ch = getchar(); }
    while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
    return s * w;
}
#ifdef local
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif
#define f(i, l, r) for (int i = l; i <= r; ++i)
#define rf(i, r, l) for (int i = r; i >= l; --i)
#define all(x) (x).begin(), (x).end()
#define l l
#define r r
#define lch (o << 1)
#define rch (o << 1 | 1)
#define mid ((l + r) >> 1)
#define mem(x, y) memset(x, y, sizeof(x))
#define mod1(x) ((x >= mod) && (x -= mod))
#define mod2(x) ((x < 0) && (x += mod))

const int inf = 2e9 + 7;
//const ll INF = INT64_MAX;
double eps = 1e-6;
const int mod = 998244353;
const int N = 3e5+10;
const double pi = acos(-1.0);
ll power(ll a, ll b) { ll res = 1; while (b) { if (b & 1)res = res * a % mod; a = a * a % mod; b >>= 1; }return res; }
ll gcd(ll a, ll b) { return !b ? a : gcd(b, a % b); }
ll exgcd(ll a, ll b, ll& x, ll& y) { ll c; return !b ? (x = 1, y = 0, a) : (c = exgcd(b, a % b, y, x), y -= (a / b) * x, c); }
ll INV(ll a) { ll x, y; exgcd(a, mod, x, y); x %= mod; if (x < 0)x += mod; return x; }
/*int len, C[N], clen;
int id(int v) { return lower_bound(C + 1, C + len, v) - C; }
void initC() { sort(C + 1, C + clen+1); len = unique(C + 1, C + 1 + clen) - C - 1; }*/

struct ST
{
    int mx[N * 4];
    void pup(int o) {
        mx[o] = max(mx[lch], mx[rch]);
    }
    void upd(int o, int l, int r, int q, int v) {
        if (l==r) {
            mx[o] = v;
            return;
        }
        if (q <= mid)upd(lch, l, mid, q,v);
        if (q > mid) upd(rch, mid + 1, r, q, v);
        pup(o);
    }
    int qry(int o, int l, int r, int ql, int qr) {//l r 为o的左右孩子 ql, qr为操作区间 求和
        if (l > qr || r < ql)return 0;
        if (ql <= l && r <= qr)return mx[o];
        return max(qry(lch, l, mid, ql, qr),qry(rch, mid + 1, r, ql, qr));
    }
}st;
int main() {
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#ifdef local
    freopen("in.txt", "r", stdin);
    int start = clock();
#endif
    int _; cin >> _;
    while (_--) {
        int n; cin >> n;
        vector<int> p(n + 1); f(i, 1, n)cin >> p[i];
        f(i, 1, n)st.upd(1, 1, n, i, i+p[i]);
        vector<int> dp(n + 1),pre(n + 1);
        vector<bool> res(n + 1);
        f(i, 2, n) {
            int s = max(0, i - p[i] - 1);
            dp[i] = dp[i - 1];
            res[i] = 1;
            if (dp[i - 1] >= s) {
                int l = 0, r = i-1;
                while (l < r) {
                    if (dp[mid] >= s)r = mid;
                    else l = mid + 1;
                }
                pre[i] = l;
                int R=max(i-1,st.qry(1,1,n,l+1,i-1));
                if (R > dp[i]) {
                    res[i] = 0; dp[i] = R;
                }
            }
            if (dp[i - 1] >= i) {
                if (i + p[i] > dp[i]) {
                    dp[i] = i + p[i]; res[i] = 1;
                }
            }
            dp[i] = max(dp[i], dp[i - 1]);
        }
        debug(dp);
        if (dp[n] >= n) {
            cout << "YES\n";
            vector<int> ans(n + 1);
            int now = n;
            while (now) {
                ans[now] = res[now];
                if (!res[now]) {
                    f(i, pre[now]+1, now - 1)ans[i] = 1;
                    now = pre[now];
                }
                else now--;
            }
            f(i, 1, n)if (ans[i])cout << "R"; else cout << "L";
            cout << "\n";
        }
        else cout << "NO\n";
    }
#ifdef local
    int end = clock();
    //cout << '\n' << end - start << "ms";
#endif* /
}