#include <bits/stdc++.h>

using namespace std;

const int N = 3e5+5;
#define lb lower_bound

int n;
int lp[N], rp[N];
int f[N], g[N], book[N];

int st[N][20], lg[N];

inline void init() {
	lg[1] = 0;
	for (int i = 2; i <= n; i++) lg[i] = lg[i>>1] + 1;
	for (int i = 1; i <= n; i++) st[i][0] = rp[i];
	for (int j = 1; (1<<j) <= n; j++) {
		for (int i = 1; i + (1<<j) - 1 <= n; i++) {
//			st[i][j] = rp[st[i][j-1]] > rp[st[i+(1<<(j-1))][j-1]] ? st[i][j-1] : st[i+(1<<(j-1))][j-1];
			st[i][j] = max(st[i][j-1], st[i+(1<<(j-1))][j-1]);
		}
	}
}

inline int qry(int x, int y) {
	if (y < x) return 0;
	int p = lg[y - x];
//	return rp[st[x][p]] > rp[st[y-(1<<p)+1][p]] ? st[x][p] : st[y-(1<<p)+1][p];
	return max(st[x][p], st[y-(1<<p)+1][p]);
}

int main()
{
	int T;
	scanf("%d", &T);
	while (T--) {
		scanf("%d", &n);
		for (int i = 1; i <= n; i++) {
			int x;
			scanf("%d", &x);
			lp[i] = i - x, rp[i] = i + x;
		}
		init();
	
		memset(f, 0, sizeof(f));
		memset(g, -1, sizeof(g));
		for (int i = 2; i <= n; i++) {
			f[i] = f[i-1];
			if (f[i-1] >= i) f[i] = max(f[i-1], rp[i]);
			int t = lb(f, f+i, lp[i]-1) - f;
//			printf("lp[%d] = %d\n", i, lp[i]);
//			printf("t = %d, f[%d] = %d\n\n", t, t, f[t]);
			if (t == i) continue;
			
			int v = max(qry(t+1, i-1), i-1);
			if (v > f[i]) f[i] = v, g[i] = t;
//			printf("f[%d] = %d\n", i, f[i]);
		}
		
		if (f[n] >= n) {
			puts("YES");
			
			memset(book, 0, sizeof(book));
			int x = n;
			while (x) {
				if (g[x] == -1) x--;
				else book[x] = 1, x = g[x];
			}
			
			for (int i = 1; i <= n; i++) {
				if (book[i]) printf("L");
				else printf("R");
			}
			puts("");
		}
		else puts("NO");
	}
	return 0;
}
/*
1
8
0 0 0 0 2 1 1 2
*/