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 LL long long
#define MAXN 501000
using namespace std;
template<typename T> void Read(T &cn)
{
	char c; int sig = 1;
	while(!isdigit(c = getchar())) if(c == '-') sig = 0;
	if(sig) {cn = c-48; while(isdigit(c = getchar())) cn = cn*10+c-48; }
	else    {cn = 48-c; while(isdigit(c = getchar())) cn = cn*10+48-c; }
}
template<typename T> void Write(T cn)
{
	int wei = 0; T cm = 0; int cx = cn%10; cn/=10;
	if(cn < 0 || cx < 0) {putchar('-'); cn = 0-cn; cx = 0-cx; }
	while(cn)cm = cm*10+cn%10,cn/=10,wei++;
	while(wei--)putchar(cm%10+48),cm/=10;
	putchar(cx+48);
}
template<typename T> void WriteL(T cn) {Write(cn); puts(""); }
template<typename T> void WriteS(T cn) {Write(cn); putchar(' '); }
template<typename T> void Max(T &cn, T cm) {cn = cn < cm ? cm : cn; }
template<typename T> void Min(T &cn, T cm) {cn = cn < cm ? cn : cm; }
struct Seg1{
	int t[MAXN*4+1];
	int n;
	void build(int cn, int l, int r, int a[])
	{
		if(l == r) {t[cn] = a[l]; return; }
		int zh = (l+r)>>1; build(cn<<1,l,zh,a); build((cn<<1)|1,zh+1,r,a);
		update(cn);
	}
	void update(int cn) {t[cn] = max(t[cn<<1], t[(cn<<1)|1]); }
	int qiu_d(int cn, int cl, int cr, int l, int r)
	{
		if(cl <= l && r <= cr) return t[cn];
		int zh = (l+r)>>1, guo = -MAXN*3;
		if(cl <= zh) Max(guo, qiu_d(cn<<1,cl,cr,l,zh));
		if(cr >  zh) Max(guo, qiu_d((cn<<1)|1,cl,cr,zh+1,r));
		return guo;
	}
	void build(int cn, int a[]) {n = cn; build(1,0,n,a); }
	int qiu_d(int cl, int cr) {return cl <= cr ? qiu_d(1,cl,cr,0,n) : 0; }
}T1;
struct Seg2{
	struct node{
		int xiao, lai;
		void zeng(int cn, int cm) {if(cn < xiao) xiao = cn, lai = cm; }
	};
	node t[MAXN*4+1];
	int n;
	void build(int cn, int l, int r, int a[])
	{
		if(l == r) {t[cn].xiao = a[l]; return; }
		int zh = (l+r)>>1; build(cn<<1,l,zh,a); build((cn<<1)|1,zh+1,r,a);
		update(cn);
	}
	void update(int cn) {t[cn] = t[cn<<1]; t[cn].zeng(t[(cn<<1)|1].xiao, t[(cn<<1)|1].lai); }
	void qu_x(int cn, int cm, int cx, int cy, int l, int r)
	{
		if(l == r) {t[cn].zeng(cx,cy); return; }
		int zh = (l+r)>>1; 
		if(cm <= zh) qu_x(cn<<1,cm,cx,cy,l,zh);
		else qu_x((cn<<1)|1, cm,cx,cy,zh+1,r);
		update(cn);
	}
	void qiu_x(int cn, int cl, int cr, int l, int r, node &ans)
	{
		if(cl <= l && r <= cr) {ans.zeng(t[cn].xiao, t[cn].lai); return; }
		int zh = (l+r)>>1;
		if(cl <= zh) qiu_x(cn<<1,cl,cr,l,zh,ans);
		if(cr >  zh) qiu_x((cn<<1)|1,cl,cr,zh+1,r,ans);
	}
	void build(int cn, int a[]) {n = cn; build(1,0,n,a); }
	void qu_x(int cn, int cm, int cx) {qu_x(1,cn,cm,cx,0,n); }
	int qiu_x(int cl, int cr) {if(cl>cr) return MAXN; node guo; guo.xiao = MAXN; qiu_x(1,cl,cr,0,n,guo); return guo.xiao; }
	int qiu_x2(int cl, int cr) {if(cl>cr) return MAXN; node guo; guo.xiao = MAXN; qiu_x(1,cl,cr,0,n,guo); return guo.lai; }
}T2;
int n,t;
int p[MAXN+1];
int linshi[MAXN+1];
int ans[MAXN+1];
void nong_ans(int cn)
{
	puts("YES");
	memset(ans,0,sizeof(ans));
	while(cn%3 != 0)
	{
		int i = cn/3, by = cn%3;
		if(by == 1) {
			ans[i] = 1;
			int lin1 = T2.qiu_x(i-p[i]-1,n);
			int lin2 = T2.qiu_x2(i-p[i]-1,n);
			int lin = max(T1.qiu_d(lin1+1,i-1), i-1);
			int lin3 = i; for(int j = lin1+1;j<=i-1;j++) if(p[j]+j == lin) lin3 = j;
			if(lin3 != i) ans[lin3] = 2;
			cn = lin2;
		}
		else {
			int lin2 = T2.qiu_x2(i,n);
			ans[i] = 2; 
			cn = lin2;
		}
	}
	int i = cn/3;
	ans[i] = 1;
	int lin = T1.qiu_d(1, i-1);
	int lin3 = i; for(int j = 1;j<=i-1;j++) if(p[j]+j == lin) lin3 = j;
	if(lin3 != i) ans[lin3] = 2;
	for(int i = 1;i<=n;i++) putchar(ans[i]<=1 ? 'L' : 'R'); puts("");
}
void zuo()
{
	Read(n); for(int i = 1;i<=n;i++) Read(p[i]);
	for(int i = 1;i<=n;i++) linshi[i] = i+p[i]; linshi[0] = 0; T1.build(n,linshi);
	for(int i = 1;i<=n;i++) linshi[i] = n+1; linshi[0] = n+1; T2.build(n,linshi);
	for(int i = 1;i<=n;i++) if(p[i])
	{
		if(i-p[i] <= 1) {
			int lin = T1.qiu_d(1,i-1);
			if(lin >= n) {nong_ans(i*3+0); return; }
			T2.qu_x(lin, i, i*3+0);
		}
		else {
			int lin1 = T2.qiu_x(i-p[i]-1, i);
			if(lin1+1 <= i) {
				int lin = max(T1.qiu_d(lin1+1, i-1), i-1);
				if(lin >= n) {nong_ans(i*3+1); return; }
				T2.qu_x(lin, i, i*3+1);
			}
		}
		int lin1 = T2.qiu_x(i, n);
		if(lin1 <= i-1) {
			int lin = i+p[i];
			if(lin >= n) {nong_ans(i*3+2); return; }
			T2.qu_x(lin, i, i*3+2);
		}
	}
	puts("NO");
}
int main()
{
//	freopen(".in","r",stdin);
//	freopen(".out","w",stdout);
	Read(t); while(t--) zuo();
	return 0;
}