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;
#define int long long
typedef pair<int,int> pi;
#define f first
#define s second
#define FAST ios_base::sync_with_stdio(0); cin.tie(0);
#define all(x) x.begin(),x.end()
typedef pair<int, pi> pii;

const int maxn = 300010;
const int INF = LLONG_MAX/2;
const int mod = 1e9+7;

struct node {
	int s,m,e;
	int v;
	node *l, *r;
	node (int _s, int _e) {
		s = _s; e = _e; m = (s+e)/2;
		v = 0;
		if (s != e) {
			l = new node(s,m);
			r = new node(m+1,e);
		}
	}
	
	void update(int x, int newv) {
		if (s == e) v = newv;
		else {
			if (x > m) r -> update(x,newv);
			else l -> update(x,newv);
			v = max(l -> v, r -> v);
		}
	}
	
	int rmq(int x, int y) {
		if (s == x and e == y) return v;
		else if (x > m) return r -> rmq(x,y);
		else if (y <= m) return l -> rmq(x,y);
		else return max(l -> rmq(x,m), r -> rmq(m+1,y));
	}
}*root1;

int n, res;

struct node2 {
	int s,m,e;
	int v;
	node2 *l, *r;
	node2 (int _s, int _e) {
		s = _s; e = _e; m = (s+e)/2;
		v = n+1;
		if (s != e) {
			l = new node2(s,m);
			r = new node2(m+1,e);
		}
	}
	
	void update(int x, int newv) {
		if (s == e) v = min(v,newv);
		else {
			if (x > m) r -> update(x,newv);
			else l -> update(x,newv);
			v = min(l -> v, r -> v);
		}
	}
	
	int rmq(int x, int y) {
		if (s == x and e == y) return v;
		else if (x > m) return r -> rmq(x,y);
		else if (y <= m) return l -> rmq(x,y);
		else return min(l -> rmq(x,m), r -> rmq(m+1,y));
	}
}*root2;

int dp[maxn];

void solve() {
	cin >> n;
	vector <int> p(n+1), far(n+1), near(n+1);
	vector <int> lr(n+1);
	for (int i =1;i<=n;i++) cin >> p[i];
	for (int i =1;i<=n;i++) dp[i] = 0;
	
	root1 = new node(1,n);
	root2 = new node2(1,n);
	
	for (int i =1;i<=n;i++) {
		far[i] = min(n, i + p[i]);
		near[i] = max(1ll, i - p[i]);
		if (p[i] != 0) root1 -> update(i,far[i]);
	}
	
	for (int i =1;i<=n;i++) {
		if (p[i] == 0) {
			dp[i] = dp[i-1];
			lr[i] = 0;
			continue;
		}
		
		//turn i right
		if (dp[i-1] >= i) {
			dp[i] = max(dp[i-1], far[i]);
			root2 -> update(dp[i],i);
			lr[i] = 0;
		}
		
		//cout << i << " " << dp[i] << "\n";
		
		//turn i left
		int mini = 0;
		if (near[i] - 1 >= 1) mini = root2 -> rmq(near[i]-1, n);
		
		if (mini == n+1) goto cannotleft;
		res = i - 1;
		if (mini+1 <= i-1) res = max(res,root1 -> rmq(mini+1, i-1));

		//cout << i << " " << mini+1 << " " << i-1 << " " << res << "\n";
			
		if (res > dp[i]) {
			lr[i] = mini+1;
			
			dp[i] = max(dp[i], res);
			root2 -> update(dp[i], i);
		}
		
		cannotleft:;
		//cout << "FINAL:\n" << i << " " << dp[i] << "\n";
		//for (int j=1;j<=n;j++) cout << root2 -> rmq(j,j) << " ";
		//cout << "\n\n";
	}
	
	if (dp[n] < n) {
		cout << "NO\n";
		return;
	}
	
	vector <char> ans;
	for (int i = n; i >= 1;) {
		if (lr[i] != 0) {
			ans.push_back('L');
			for (int j = i-1; j >= lr[i]; j--) {
				ans.push_back('R');
			}
			i = lr[i]-1;
		} else {
			ans.push_back('R');
			i--;
		}
	}
	
	reverse(all(ans));
	cout << "YES\n";
	for (auto i: ans) cout << i;
	cout << "\n";
}

int32_t main() {
	//FAST
	int tc; cin >> tc;
	while (tc--) solve();
}