Consider any permutation p1,p2,…,pn of the integers 1,2,…,n.
Define p0=n+1 and pn+1=n+2.
For each index i (1≤i≤n) we compute a character ci as follows:
- Let x be the index of the nearest greater element to the left of i: x=max{j∣0≤j<i and pj>pi}.
- Let y be the index of the nearest greater element to the right of i: y=min{j∣i<j≤n+1 and pj>pi}.
- If px<py then ci=
L, otherwise ci = R.
In other words, we look at the closest larger element on the left and the closest larger element on the right.
The character L means the left one is smaller, R means the right one is smaller.
Now you are given the string s. Determine whether there exists a permutation p such that ci=si for every i=1…n.
If no such permutation exists, print No.
If it exists, print Yes and on the next line output any permutation p that satisfies the condition.
Constraints
- 1≤t≤104
- 1≤n≤2×105
- The sum of n over all test cases is at most 2×105