| Baozii Cup 1 |
|---|
| Finished |
Baozii presents to you a strip of $$$n$$$ cells, all initially white. You are given a target pattern consisting of $$$n$$$ cells, where each cell is either white or black. Your task is to determine whether it is possible to transform the strip into the given target pattern by performing a finite sequence of the following operation:
Determine if the transformation is achievable. If so, output a valid sequence of operations.
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 1000$$$). The description of the test cases follows.
The first line of each test case contains an integer $$$n$$$ ($$$2 \le n \le 100$$$) — length of Baozii's strip.
The second line contains a binary string of length $$$n$$$, representing the pattern. If the $$$i$$$-th character is 1, the $$$i$$$-th cell should be colored black; otherwise, the $$$i$$$-th cell should be colored white.
For each test case, output "YES" (without quotes) if there exists a finite sequence of operations which colors the strip to the given pattern, and "NO" (without quotes) otherwise.
If the answer is "YES", output the sequence in the following format:
You can output the answer in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses.
45010102101001111001003000
YES 2 1 3 NO YES 9 7 7 7 7 4 3 2 1 1 YES 0
| Name |
|---|


