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;
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,int> pli;
const int maxn=3e5+10;
const int max_logn=20;
const int INF=0x3f3f3f3f;
char s[maxn];
int p[maxn],rig[maxn][max_logn],mm[maxn];
int rmq(int l,int r)
{
    if(l>r) return 0;
    int k=mm[r-l+1];
    return max(rig[l][k],rig[r-(1<<k)+1][k]);
}
int mx[maxn<<2];
inline void pushup(int rt)
{
    mx[rt]=min(mx[rt<<1],mx[rt<<1|1]);
}
void build(int l,int r,int rt)
{
    mx[rt]=INF;
    if(l==r) return;
    int mid=l+r>>1;
    build(l,mid,rt<<1);
    build(mid+1,r,rt<<1|1);
}
void update(int pos,int val,int l,int r,int rt)
{
    if(l==r) {mx[rt]=min(mx[rt],val);return;}
    int mid=l+r>>1;
    if(pos<=mid) update(pos,val,l,mid,rt<<1);
    else update(pos,val,mid+1,r,rt<<1|1);
    pushup(rt);
}
int query(int L,int R,int l,int r,int rt)
{
    if(L<=l&&R>=r) return mx[rt];
    int mid=l+r>>1,ans=INF;
    if(L<=mid) ans=min(ans,query(L,R,l,mid,rt<<1));
    if(R>mid) ans=min(ans,query(L,R,mid+1,r,rt<<1|1));
    return ans;
}
int pre[maxn],dp[maxn];
int main()
{
    #ifdef local
    freopen("a.in","r",stdin);
    #endif
    mm[0]=0;
    for(int i=1;i<maxn;++i){
        mm[i]=mm[i-1];
        if(i==1<<(mm[i]+1)) ++mm[i];
    }
    int t,n;
    for(scanf("%d",&t);t--;){
        scanf("%d",&n);
        for(int i=1;i<=n;++i) scanf("%d",p+i),rig[i][0]=min(n,i+p[i]),s[i]='R',pre[i]=-1;
        for(int j=1;j<=mm[n];++j){
            for(int i=1;i+(1<<j)-1<=n;++i){
                rig[i][j]=max(rig[i][j-1],rig[i+(1<<(j-1))][j-1]);
            }
        }
        build(0,n,1);
        update(0,0,0,n,1);
        for(int i=1;i<=n;++i){
            dp[i]=dp[i-1];
            if(dp[i-1]>=i) dp[i]=max(dp[i-1],rig[i][0]);
            int pos=query(i-p[i]-1,n,0,n,1);
            if(pos==INF) continue;
            int r=max(i-1,rmq(pos+1,i-1));
            if(r>dp[i]) dp[i]=r,pre[i]=pos;
            update(dp[i],i,0,n,1);
        }
        if(dp[n]<n) puts("NO");
        else{
            for(int i=n;i;--i){
                if(pre[i]>=0){
                    s[i]='L';
                    for(int j=i-1;j>pre[i];--j) pre[j]=-1;
                }
            }
            s[n+1]='\0';
            puts("YES");
            printf("%s\n",s+1);
        }
    }
    return 0;
}