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 FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define REP(i,a,b) for(int i=(a);i>=(b);i--)
#define deb(x) cerr<<(#x)<<":"<<(x)<<'\n'
#define pb push_back
#define fi first
#define se second
#define hvie '\n'
using namespace std;
typedef pair<int,int> pii;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
int yh(){
	int ret=0;bool f=0;char c=getchar();
	while(!isdigit(c)){if(c==EOF)return -1;if(c=='-')f=1;c=getchar();}
	while(isdigit(c))ret=(ret<<3)+(ret<<1)+(c^48),c=getchar();
	return f?-ret:ret;
}
const int maxn=3e5+65,inf=0x3f3f3f3f;
int n;
int p[maxn];
struct segtree{
	int m[maxn<<2];bool ismax;
	#define ls (v<<1)
	#define rs (v<<1|1)
	#define mid ((l+r)>>1)
	void push_up(int v){
		m[v]=ismax?max(m[ls],m[rs]):min(m[ls],m[rs]);
	}
	void build(int v,int l,int r){
		m[v]=ismax?-inf:inf;
		if(l==r) return;
		build(ls,l,mid);build(rs,mid+1,r);
	}
	void modify(int v,int l,int r,int p,int val){
		if(l==r) return m[v]=ismax?max(m[v],val):min(m[v],val),void();
		if(p<=mid) modify(ls,l,mid,p,val);
		else modify(rs,mid+1,r,p,val);
		push_up(v);
	}
	int ask(int v,int l,int r,int al,int ar){
		if(al>ar) return ismax?-inf:inf;
		if(al<=l&&ar>=r)return m[v];
		if(ar<=mid) return ask(ls,l,mid,al,ar);
		else if(al>mid) return ask(rs,mid+1,r,al,ar);
		else return ismax? max(ask(ls,l,mid,al,ar),ask(rs,mid+1,r,al,ar)):
						   min(ask(ls,l,mid,al,ar),ask(rs,mid+1,r,al,ar));
	}
}mx,mn;
int dp[maxn],fa[maxn];
int main(){
	REP(_,yh(),1){
		n=yh();
		mx.ismax=1;mn.ismax=0;
		mx.build(1,0,n+1);mn.build(1,0,n+1);
		for(int i=0;i<n;i++) p[i]=yh();
		vector<int>dp(n+1,-inf);
		vector<int>fa(n+1,-2);
		dp[0]=0;fa[0]=-1;
		vector<int>L(n),R(n);
		FOR(i,0,n-1){
			L[i]=max(1,i-p[i]+1);
			R[i]=min(n,i+p[i]+1);
			mx.modify(1,0,n+1,i,R[i]);
		}
		mn.modify(1,0,n+1,0,0);
		FOR(i,1,n){
			int j=i-1;
			int k=L[j]-1;
			int m=mn.ask(1,0,n+1,k,n+1);
			// cout<<j<<" "<<k<<" "<<m<<hvie;
			if(m!=inf){
				int nval=max(mx.ask(1,0,n+1,m,i-2),i-1);
				// deb(nval);
				if(nval>dp[i]){
					dp[i]=nval;
					fa[i]=m;
				}
			}
			if(dp[j]>=i&&max(dp[j],R[j])>dp[i]){
				dp[i]=max(dp[j],R[j]);
				fa[i]=-1;
			}
			if(dp[j]>dp[i]){
				dp[i]=dp[j];
				fa[i]=-1;
			}
			mn.modify(1,0,n+1,dp[i],i);
			// cerr<<"MOdi: "<<dp[i]<<" "<<i<<hvie;
		}
		// for(int i=1;i<=n;i++)cout<<dp[i]<<" ";puts("");
		// for(int i=1;i<=n;i++)cout<<fa[i]<<" ";puts("");

		if(dp[n]!=n) puts("NO");
		else{
			puts("YES");
			string ans;
			int now=n;
			while(now){
				if(fa[now]==-1){
					now--;
					ans+="R";
				}
				else{
					int pre=fa[now];
					ans+="L";
					for(int j=now-1;j>pre;j--){
						ans+="R";
					}
					now=pre;
				}
			}
			reverse(ans.begin(),ans.end());
			cout<<ans<<hvie;
		}

	}
	return 0;
}