Your friend invented a game about guessing a hidden sequence.
There is a sequence $$$a_1,a_2,\dots,a_n$$$ of nonnegative integers that you do not know.
Instead, your friend gives $$$m$$$ clues about the sequence.
The clues have the format $$$l$$$ $$$r$$$ U or $$$l$$$ $$$r$$$ N (where $$$1 \leq l \leq r \leq n$$$), indicating if there is a unique maximum in the sequence $$$a_l,a_{l+1},\dots,a_r$$$ or not, respectively.
More formally, there is a unique maximum in the sequence $$$a_l,a_{l+1},\dots,a_r$$$ if there exists an integer $$$s$$$ such that $$$s \in [l,r]$$$ and $$$a_s \gt a_i$$$ for every $$$i \in [l,r] \setminus \{s\}$$$.
Can you find any sequence that satisfies the requirements, or tell that it is impossible to find such a sequence?
The first line of the input contains an integer $$$t$$$ $$$(1 \leq t \leq 300)$$$, denoting the number of testcases.
For each testcase, the first line contains two integers $$$n$$$ $$$(1 \leq n \leq 300)$$$ and $$$m$$$ $$$(1 \leq m \leq \frac{n(n+1)}{2})$$$ denoting the number of elements in the hidden array and the number of hints, respectively. Then exactly $$$m$$$ lines follow, the $$$i$$$-th of which contains two integers $$$l_i$$$ and $$$r_i$$$ $$$(1 \leq l_i \leq r_i \leq n)$$$ and a character $$$c_i$$$, which can only be "U" or "N".
It is guaranteed that there are no two integers $$$1 \leq i \lt j \leq m$$$ such that $$$l_i=l_j$$$ and $$$r_i=r_j$$$.
It is guaranteed that the sum of $$$n$$$ across all testcases does not exceed $$$300$$$.
For each testcase, you should output one line containing either "YES" if there is an array or "NO" if the hints are contradictory.
If the answer is "YES", additionally you should output $$$n$$$ integers corresponding to an array that satisfies the constraints. Each of these integers must be in the range $$$[1,10^9]$$$
25 41 2 U3 4 U3 5 N4 5 N5 41 2 U3 4 U3 5 N4 5 U
YES 10 9 7 8 8 YES 10 9 8 7 8
45 42 3 U1 3 N2 4 N1 4 U4 51 2 U1 3 U1 4 N2 3 N3 4 U4 51 2 N1 3 U1 4 N2 3 U2 4 N6 81 3 U1 5 U2 3 N2 4 U2 6 N3 4 U3 5 U4 5 U
NO YES 8 7 7 8 YES 7 7 8 8 YES 12 10 10 11 10 11
| Name |
|---|


