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 ONLINE_JUDGE
#ifndef ONLINE_JUDGE
#define debug(x) cout << #x << '\t' << x << endl
#else
#define debug(x)
#endif
typedef long long ll;
typedef unsigned long long ull;
const ll mod = 1e9 + 7;
const double eps = 1e-8;
const ll LINF = 0x3f3f3f3f3f3f3f3f;
#define fast                     \
    ios::sync_with_stdio(false); \
    cin.tie(0);                  \
    cout.tie(0)
typedef pair<int, int> pii;
const int INF = 0x3f3f3f3f;
#define lowbit(x) ((x) & -(x))
#define mem(a, b) memset(a, b, sizeof(a))
#define PI acos(-1)
#define endl '\n'
#define lson l, mid, rt << 1
#define rson mid + 1, r, rt << 1 | 1
//#define int long long
//ll gcd(ll a, ll b){a = abs(a);b = abs(b);return a == 0 ? b : gcd(b % a, a);}
//inline ll Pow(ll a, ll n, ll MOD) { ll t = 1; a %= MOD; while (n > 0) { if (n & 1) t = t * a % MOD; a = a * a % MOD, n >>= 1; } return t % MOD; }

const int N = 3e5 + 5;
int lg[N],n;
int a[N];

void init(){
    lg[0] = -1;
    for (int i = 1; i <= 300002; ++i)
        lg[i] = lg[i >> 1] + 1;
}

struct st {
    //预处理lg[N]
    int cmin[N][19], cmax[N][19];
    void pre()
    {
        for (int i = 0; i <= n; ++i) { //从0开始
            cmax[i][0] = a[i]+i;
            cmin[i][0] = a[i]+i;
        }
        for (int i = 1; (1 << i) <= n; ++i)
            for (int j = 1; j + (1 << i) - 1 <= n; ++j) {
                cmax[j][i] = max(cmax[j][i - 1], cmax[j + (1 << i - 1)][i - 1]);
                cmin[j][i] = max(cmin[j][i - 1], cmin[j + (1 << i - 1)][i - 1]);
            }
    }
    int querymax(int l, int r) //区间最大
    {
        if (l > r)
            return 0;
        int t = lg[r - l + 1];
        return max(cmax[l][t], cmax[r - (1 << t) + 1][t]);
    }
    int querymin(int l, int r) //区间最小
    {
        if (l > r)
            return 0;
        int t = lg[r - l + 1];
        return min(cmin[l][t], cmin[r - (1 << t) + 1][t]);
    }
} A;

int dp[N];
int pr[N];
int dir[N],s[N];

signed main()
{
#ifndef ONLINE_JUDGE
    freopen("in.txt", "r", stdin);
// freopen("out.txt", "w", stdout);
#endif
    fast;
    int T;
    cin>>T;
    init();
    while(T--){
        cin>>n;
        for(int i = 1; i <= n; i++){
            cin>>a[i];
        }
        a[++n] = 0;
        for(int i = 0; i <= n; i++){
            dir[i] = 0;
            s[i] = 0;
            pr[i] = 0;
            dp[i] = 0;
        }
        A.pre();
        int mx = -1;
        int las = 0;
        for(int i = 1; i <= n; i++){
            int l = 0, r = i-1;
            int res = -1;
            while(l<=r){
                int mid = l+r>>1;
                if(dp[mid]>=i-a[i]-1){
                    res = mid;
                    r = mid-1;
                }
                else{
                    l = mid+1;
                }
            }
            debug(res);
            if(res>=0){
                dp[i] = max(i-1,A.querymax(res+1,i-1));
                pr[i] = res;
            }
            if(dp[i-1]>=i&&dp[i]<i+a[i]){
                dp[i] = i+a[i];
                pr[i] = i-1;
                s[i] = 1;
            }
            if(mx > dp[i]){
                dp[i] = mx;
                pr[i] = las;
            }
            else{
                mx = dp[i];
                las = i;
            }
            debug(i);
            debug(dp[i]);
        }
        if(dp[n]>=n-1){
            cout<<"YES"<<endl;
            for(int i = n; i >= 1; i = pr[i]){
                for(int j = pr[i]+1; j < i; j++){
                    dir[j] = 1;
                }
                dir[i] = s[i];
            }
            for(int i = 1; i < n; i++){
                cout<<(dir[i]?'R':'L');
            }
            cout<<endl;
        }
        else{
            cout<<"NO"<<endl;
        }
    }
    return 0;
}