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 GCC optimize("Ofast","unroll-loops","omit-frame-pointer","inline")
#pragma GCC option("arch=native","tune=native","no-zero-upper")
#pragma GCC target("avx2")
#include <bits/stdc++.h>
using namespace std;
#define INF 2147483647
#define infL (1LL<<60)
#define inf (1<<30)
#define inf9 (1000000000)
#define MOD 1000000007//998244353//1000000007
#define EPS 1e-9
#define Gr 9.8
#define PI acos(-1)
#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define REQ(i,n) for(int (i)=1;(i)<=(int)(n);(i)++)
#define lch (rt<<1)
#define rch (rt<<1|1)
#define readmp(n) for(int i=0,u,v;i<n;i++) {scanf("%d%d",&u,&v); mp[u].push_back(v); mp[v].push_back(u);}
typedef  long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef long double ld;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef ld ValType;
template<typename  T> void maxtt(T& t1, T t2) {
    t1=max(t1,t2);
}
template<typename  T> void mintt(T& t1, T t2) {
    t1=min(t1,t2);
}
#define MAX (300135)

bool debug = 0;
int n,m,k;
int dx[4] = {0,1,0,-1}, dy[4] = {1,0,-1,0};
string direc="RDLU";
const ll MOD2 = (ll)MOD * (ll)MOD;
ll ln, lk, lm;
void etp(bool f = 0) {
    puts(f ?"YES" : "NO");
    exit(0);
}
void addmod(int &x, int y, int mod = MOD){
    x+=y; if (x>=mod) x-=mod;
    if(x<0) x+=mod;
    assert(x>=0 && x<mod);
}
void et(int x=-1) {
    printf("%d\n", x); exit(0);
}
ll fastPow(ll x, ll y, int mod=MOD) {
    ll ans = 1;
    while(y>0) {
        if(y&1) ans = (x * ans)%mod;
        x = x*x%mod;
        y>>=1;
    }
    return ans;
}
ll gcd1(ll x, ll y) {
    return y?gcd1(y,x%y):x;
}






int p[MAX];
int lg[MAX],T[MAX][20];
void init() {
    for(int i=2;i<MAX;i++)lg[i]=lg[i>>1]+1;
}
void initM(int n) {
    REQ(i,n) T[i][0]=i+p[i];
    for(int j=1;(1<<j)<=n;j++) {
        for(int i=1;i+(1<<j)-1<=n;i++) {
            T[i][j] = max(T[i][j-1], T[i+(1<<(j-1))][j-1]);
        }
    }
}
int qym(int l, int r) {
    if (r<l) return 0;
    int x = lg[r-l+1];
    int y = max(T[l][x], T[r-(1<<x)+1][x]);
    return y;
}
void fmain(int tid) {
    scanf("%d", &n);
    REQ(i,n) scanf("%d", p+i);
    initM(n);
    vector<int> dp(n+1, 0);
    vector<int> path(n+1,0);
    for(int i=2;i<=n;i++) {
        dp[i]=dp[i-1]; path[i]=-1;
        if (dp[i-1] >= i && i+p[i] >= dp[i]) {
            maxtt(dp[i], i+p[i]);
            path[i]=-1;
        }
        int tar = max(i-p[i]-1, 0);
        int l=0,r=i-1;
        while (l+1<r) {
            int mid=(l+r)/2;
            if (dp[mid] >= tar) r=mid;
            else l=mid+1;
        }
        int t = dp[l] >= tar ? l : r;
        if (dp[t] < tar) continue;
        int tmp=max(i-1, qym(t+1,i-1));
        if(tmp>dp[i]) {
            dp[i]=tmp; path[i]=t;
        }
    }
    if (dp[n]<n) {
        puts("NO");
    } else {
        puts("YES");
        vector<char> vp(n+1);
        for(int i=n;i;) {
            if (path[i]==-1) {
                vp[i]='R'; i--;
            } else {
                int t=path[i];
                vp[i]='L';
                for(int j=t+1;j<i;j++) vp[j]='R';
                i=t;
            }
        }
        REQ(i,n) printf("%c", vp[i]);
        puts("");
    }
}
int main() {
    int t=1;
    init();
    scanf("%d", &t);
    REQ(i,t) {
        fmain(i);
    }
    return 0;
}