P13713 Sunny Days
Background
> But somehow, the wind gradually blows the distance so far.
>
> 但偏偏,风渐渐,把距离吹得好远。
Description
Little P has the ability to control the weather. On the $i$-th day, he specifies a weather value $a_i$, where $a_i \in \{-1, 0, 1\}$. After $n$ days, Little P obtains a sequence of weather values $a$ of length $n$.
The local residents have a unique way to determine the weather. For the $i$-th day ($2 \le i \le n-1$), they calculate a new value $s_i = a_{i-1} + a_i + a_{i+1}$ and judge the weather as follows:
- If $\bm{1 \le s_i \le 2}$, the residents consider the $i$-th day to be sunny.
- If $\bm{-2 \le s_i \le -1}$, the residents consider the $i$-th day to be cloudy.
- Otherwise, the residents consider the $i$-th day to be rainy.
Note that the 1st day and the $n$-th day are always considered rainy by default. The local residents take the weather very seriously and hope that there are **exactly $\bm{x}$ sunny days and $\bm{y}$ cloudy days** in these $n$ days. Please determine whether Little P can achieve this and provide a feasible sequence if possible. Otherwise, indicate that it is impossible.
Input Format
**This problem contains multiple test cases.**
The first line of input contains an integer $T$, representing the number of test cases.
For each test case, there is one line containing three integers $n, x, y$, representing the number of days, the required number of sunny days, and the required number of cloudy days, respectively.
Output Format
For each test case:
- If a solution exists, output a line of $n$ integers, representing your constructed sequence.
- If no solution exists, output a single integer $-2$.
If there are multiple valid solutions, you only need to output any one of them.
Explanation/Hint
### Sample Explanation
- For the first test case, `0 1 0 -1 0` is a valid sequence where the 2nd day is sunny and the 4th day is cloudy. Note that the solution may not be unique; `1 1 0 -1 -1` is also a valid solution.
- For the second test case, it can be proven that no valid solution exists.
### Data Constraints
**Subtasks are used in this problem.**
- Subtask 0 (0 pts): Sample cases.
- Subtask 1 (5 pts): $\sum n \le 10$.
- Subtask 2 (15 pts): $\sum n \le 30$.
- Subtask 3 (10 pts): $x + y > n$.
- Subtask 4 (15 pts): $x + y \le \lfloor \frac{n}{3} \rfloor$.
- Subtask 5 (15 pts): $x = 0$ or $y = 0$.
- Subtask 6 (25 pts): $\sum n \le 10^3$.
- Subtask 7 (15 pts): $\sum n \le 10^6$.
For all test cases, it is guaranteed that $1 \le n \le 10^6$, $\sum n \le 10^6$, and $0 \le x, y \le n$.