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>

#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define ll long long
#define ld long double

#define prev prev666
#define left left666
#define right right666
#define dist dist666
#define tm tm666

using namespace std;

mt19937 rnd(time(nullptr));

const long long INF = 1e9, P = 1e9 + 7, N = 3e5 + 10;
const long double EPS = 1e-9;
int n, p[N], dp[N];
pair<int, int> prev[N], tree[4 * N];

void build(int t, int l, int r) {
    if (l + 1 == r) {
        tree[t] = {p[l] + l, l};
        return;
    }
    int mid = (l + r) / 2;
    build(t * 2 + 1, l, mid);
    build(t * 2 + 2, mid, r);
    tree[t] = max<pair<int, int> >(tree[t * 2 + 1], tree[t * 2 + 2]);
}

pair<int, int> get_max(int t, int l, int r, int x, int y) {
    if (r <= x || y <= l) {
        return {-1, -1};
    }
    if (x <= l && r <= y) {
        return tree[t];
    }
    int mid = (l + r) / 2;
    return max<pair<int, int> > (get_max(t * 2 + 1, l, mid, x, y), get_max(t * 2 + 2, mid, r, x, y));
}

void solve() {
    cin >> n;
    for (int i = 0; i < n; i++) {
        cin >> p[i];
    }
    build(0, 0, n);
    for (int i = 0; i < n; i++) {
        dp[i] = -1;
        prev[i] = {1, i - 1};
        if (i != 0) {
            dp[i] = dp[i - 1];
        }
        if (i != 0 && dp[i - 1] >= i) {
            dp[i] = max<int>(dp[i - 1], i + p[i]);
            prev[i] = {1, i - 1};
        }
        int need = i - p[i] - 1, l = -1, r = i - 1;
        if (need < 0) {
            r = -1;
        } else {
            while (r - l > 1) {
                int mid = (l + r) / 2;
                if (dp[mid] >= need) {
                    r = mid;
                } else {
                    l = mid;
                }
            }
        }
        if (r + 1 < i && dp[r] >= need) {
            pair<int, int> p = get_max(0, 0, n, r + 1, i);
            int mx = p.first, j = p.second;
            if (dp[i] < mx) {
                dp[i] = mx;
                prev[i] = {-1, j};
            }
        }
        if ((i - p[i] <= 0)) {
            if (dp[i] < i - 1) {
                dp[i] = i - 1;
                prev[i] = {-1, -1};
            }
        }
        if ((i > 0 && dp[i - 1] >= need)) {
            if (dp[i] < i - 1) {
                dp[i] = i - 1;
                prev[i] = {-1, -2};
            }
        }

    }
    /*cout << "dp ";
    for (int i = 0; i < n; i++) {
        cout << dp[i] << ' ';
    }
    cout << "\n";*/
    if (dp[n - 1] < n - 1) {
        cout << "NO\n";
        return;
    }
    int v = n - 1;
    vector<char> ans(n, 'L');
    while (v >= 0) {
        pair<int, int> p = prev[v];
        if (p.first == 1) {
            ans[v] = 'R';
            v--;
        } else if (p.first == -1) {
            int u = p.second;
            ans[v] = 'L';
            if (u == -1) {
                break;
            } else if (u == -2) {
                v--;
            } else {
                ans[u] = 'R';
                v = u - 1;
            }
        }
    }
    cout << "YES\n";
    for (char elem : ans) {
        cout << elem;
    }
    cout << "\n";
}

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    //cout << setprecision(15) << fixed;

    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    int t;
    cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}