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;
int read() {
	char c=getchar(); int x=0,f=1;
	while (c<'0' || c>'9') {
		if (c=='-') f=-1;
		c=getchar();
	}
	while (c>='0' && c<='9') {
		x=x*10+c-'0';
		c=getchar();
	}
	return x*f;
}
const int inf=1<<29;
int p[300005],L[300005],R[300005],dp[300005],pre[300005][2];
char ans[300005];
int st[300005][19],log_2[300005];
int mi[1200005];
int qmx(int l,int r) {
	if (l>r) return -inf;
	int t=log_2[r-l+1];
	return max(st[l][t],st[r-(1<<t)+1][t]);
}
void init(int l,int r,int t) {
	mi[t]=inf;
	if (l==r) return;
	int mid=(l+r)>>1,lson=t<<1,rson=lson|1;
	init(l,mid,lson);
	init(mid+1,r,rson);
}
void modify(int x,int l,int r,int t,int k) {
	if (l==r) {
		mi[t]=min(mi[t],k);
		return;
	}
	int mid=(l+r)>>1,lson=t<<1,rson=lson|1;
	if (x<=mid) modify(x,l,mid,lson,k);
	else modify(x,mid+1,r,rson,k);
	mi[t]=min(mi[lson],mi[rson]);
}
int query(int x,int y,int l,int r,int t) {
	if (y<l || r<x) return inf;
	else if (x<=l && r<=y) return mi[t];
	else {
		int mid=(l+r)>>1,lson=t<<1,rson=lson|1;
		return min(query(x,y,l,mid,lson),query(x,y,mid+1,r,rson));
	}
}
int main() {
	int T=read();
	while (T--) {
		int n=read();
		for (int i=1; i<=n; i++) p[i]=read();
		for (int i=1; i<=n; i++) {
			L[i]=i-p[i];
			R[i]=st[i][0]=(p[i]==0)?-inf:(i+p[i]);
			log_2[i]=log(i)/log(2);
		}
		for (int i=1; i<=18; i++) {
			for (int j=1; j+(1<<i)-1<=n; j++) {
				st[j][i]=max(st[j][i-1],st[j+(1<<(i-1))][i-1]);
			}
		}
		//L:0 R:1
		init(0,n,1);
		dp[0]=0;
		modify(dp[0],0,n,1,0);
		for (int i=1; i<=n; i++) {
			if (p[i]==0) {
				pre[i][0]=i-1;
				pre[i][1]=1;
				dp[i]=dp[i-1];
				continue;
			}
			pre[i][0]=i-1;
			pre[i][1]=1;
			dp[i]=dp[i-1];
			if (dp[i-1]>=i && dp[i]<max(dp[i-1],R[i])) {
				pre[i][0]=i-1;
				pre[i][1]=1;
				dp[i]=max(dp[i-1],R[i]);
			}
			int j=query(max(0,L[i]-1),n,0,n,1);
			if (j<inf) {
				int mx=max(dp[j],i-1);
				mx=max(mx,qmx(j+1,i-1));
				if (dp[i]<mx) {
					pre[i][0]=j;
					pre[i][1]=0;
					dp[i]=mx;
				}
			}	
			if (dp[i]>n) dp[i]=n;
			modify(dp[i],0,n,1,i);
		}
		if (dp[n]==n) {
			puts("YES");
			int t=n;
			while (t) {
				if (pre[t][1]==1) ans[t]='R';
				else {
					ans[t]='L';
					for (int i=pre[t][0]+1; i<t; i++) ans[i]='R';
				}
				t=pre[t][0];
			}
			for (int i=1; i<=n; i++) printf("%c", ans[i]);
			printf("\n");
		}
		else puts("NO");
	}
	return 0;
}