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:
#pragma comment(linker,"/stack:200000000")
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define N 300005
#define int long long
using namespace std;

template <typename T>

void read(T &a)
{
	T x = 0,f = 1;
	char ch = getchar();
	while (ch < '0' || ch > '9')
	{
		if (ch == '-') f = -1;
		ch = getchar();
	}
	while (ch >= '0' && ch <= '9')
	{
		x = (x << 1) + (x << 3) + (ch ^ 48);
		ch = getchar();
	}
	a = x * f;
}

template <typename T>

void write(T x)
{
	if (x < 0) putchar('-'),x = -x;
	if (x < 10) return (void) putchar(x + '0');
	write(x / 10);
	putchar(x % 10 + '0');
}

template <typename T>

void writeln(T x)
{
	write(x);
	putchar('\n');
}

template <typename T>

void writes(T x)
{
	write(x);
	putchar(' ');
}

template <typename T,typename... Args> 

void read(T &t,Args &... args)
{
	read(t);
	read(args...);
}

template <typename T,typename... Args>

void writes(T t,Args ... args)
{
	writes(t);
	writes(args...);
}

template <typename T,typename... Args>

void writeln(T t,Args ... args)
{
	writes(t);
	writes(args...);
	putchar('\n');
}

const int inf = 0x7f7f7f7f7f7f7f;
int n,k,p[N],dp[N],pre[N];

struct Segment_Tree
{
	int maxx[N << 2];
	void pushup(int now)
	{
		maxx[now] = max(maxx[now << 1],maxx[now << 1 | 1]);
	}
	void build(int now,int l,int r)
	{
		if (l == r) return (void) (maxx[now] = min(n,p[l] + l));
		int mid = (l + r) >> 1;
		build(now << 1,l,mid);
		build(now << 1 | 1,mid + 1,r);
		pushup(now);
	}
	int query(int now,int l,int r,int ll,int rr)
	{
		if (ll <= l && rr >= r) return maxx[now];
		int mid = (l + r) >> 1,ans = -inf;
		if (ll <= mid) ans = max(ans,query(now << 1,l,mid,ll,rr));
		if (rr > mid) ans = max(ans,query(now << 1 | 1,mid + 1,r,ll,rr));
		return ans;
	}
}T;

signed main()
{
	int t;
	read(t);
	while (t--)
	{
		std::vector<pair<int,int> > v;
		read(n);
		for (int i = 1; i <= n; i++)
			read(p[i]);
		T.build(1,1,n);
		for (int i = 1; i <= n; i++)
			pre[i] = -1;
		v.push_back(make_pair(dp[0],0));
		for (int i = 1; i <= n; i++)
		{
			if (dp[i - 1] < i) dp[i] = dp[i - 1];
			else dp[i] = max(dp[i - 1],min(n,i + p[i]));
			int it = lower_bound(v.begin(),v.end(),make_pair(i - p[i] - 1,0LL)) - v.begin();
			if (it != v.size())
			{
				int qaq = v[it].first;
				if (v[it].second == i - 1) qaq = max(qaq,i - 1);
				else qaq = max(qaq,T.query(1,1,n,v[it].second + 1,i - 1));
				if (qaq > dp[i]) pre[i] = v[it].second,dp[i] = qaq;
			}
			if (dp[i] > v.back().first) v.push_back(make_pair(dp[i],i));
		}
		if (dp[n] != n)
		{
			puts("NO");
			continue;
		}
		puts("YES");
		std::vector<char> sk;
		int u = n;
		while (u)
		{
			if (pre[u] == -1)
			{
				sk.push_back('R');
				u--;
				continue;
			}
			sk.push_back('L');
			for (int i = pre[u] + 1; i < u; i++)
				sk.push_back('R');
			u = pre[u];
		}
		while (!sk.empty()) putchar(sk.back()),sk.pop_back();
		puts("");
	}
	return 0;
}