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>

#define pi 3.141592653589793
#define en 2.718281828459045
#define oo 0x3f3f3f3f3f3f3f3f
#define M7 1000000007
#define M3 998244353

#define lowbit(x) (x&(-x))
#define puts(x) cout<<(x)<<endl

using namespace std;

using ll = long long;
using uint = unsigned int;
using ull = unsigned long long;
using ii = pair<int,int>;

const int maxn=300005;

int n;
int p[maxn];
int dp[maxn];
pair<int,int> cl[maxn];

struct ZKW {
    int w;
    vector<int> v;
    void init(int n) {
        for(w=1;w<n+2;w<<=1);
        v.resize(w<<1);
        v.assign(w,0);
    }
    void readn(int n) {
        for(int i=1;i<=n;i++) 
            v[w+i]=p[i]+i;
        for(int i=w-1;i>=1;i--)
            v[i]=max(v[i<<1],v[i<<1|1]);
    }
    int query(int L,int R) {
        if(L>R) return 0;
        // cout<<"["<<L<<","<<R<<"] ";
        int res=0;
        for(int l=w+L-1,r=w+R+1;l^r^1;l>>=1,r>>=1) {
            if(~l&1) res=max(res,v[l^1]);
            if(r&1) res=max(res,v[r^1]);
        }
        // cout<<res<<endl;
        return res;
    }
} zkw;

void prepare() {
    
}

void input() {
    cin>>n;
    zkw.init(n);
    for(int i=1;i<=n;i++) cin>>p[i];
    zkw.readn(n);
}

void check(int &dp_old,ii &cl_old,int dp_new,ii cl_new) {
    if(dp_old<dp_new) {
        dp_old=dp_new;
        cl_old=cl_new;
    }
}

void solve() {
    for(int i=1;i<=n;i++) dp[i]=0;
    for(int i=1;i<=n;i++) cl[i]=ii(0,0);
    for(int i=1;i<=n;i++) {
        int l=0,r=i-1,res=-1;
        while(l<=r) {
            int mid=(l+r)>>1;
            if(dp[mid]>=i-p[i]-1) {
                r=mid-1;
                res=mid;
            }
            else l=mid+1;
        }
        // cout<<res<<endl;
        if(res!=-1) check(dp[i],cl[i],max(i-1,zkw.query(res+1,i-1)),ii(res,0));
        check(dp[i],cl[i],dp[i-1],ii(i-1,0));
        if(dp[i-1]>=i) check(dp[i],cl[i],max(dp[i-1],i+p[i]),ii(i-1,1));
        // cout<<cl[i].first<<" "<<cl[i].second<<" i: "<<i<<" which have "<<dp[i]<<endl;
    }
}

void printans(int x) {
    if(x==0) return;
    printans(cl[x].first);
    for(int i=cl[x].first+1;i<x;i++) cout<<"R";
    if(cl[x].second) cout<<"R";
    else cout<<"L";
}

void output() {
    if(dp[n]>=n) {
        puts("YES");
        printans(n);
        cout<<endl;
    }
    else {
        puts("NO");
    }
}

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    prepare();
    int T; cin>>T;
    for(int tes=1; tes<=T; tes++) {
        input();
        solve();
        output();
    }
    return 0;
}