CF1733B.Rule of League

传统题 时间 2000 ms 内存 256 MiB 4 尝试 1 已通过 1 标签

Rule of League

There is a badminton championship in which nn players take part. The players are numbered from 11 to nn.

The championship proceeds as follows: player 11 and player 22 play a game, then the winner and player 33 play a game, and then the winner and player 44 play a game, and so on. So, n1n-1 games are played, and the winner of the last game becomes the champion. There are no draws in the games.

You want to find out the result of championship. Currently, you only know the following information:

  • Each player has either won xx games or yy games in the championship.

Given nn, xx, and yy, find out if there is a result that matches this information.

Input

The first line contains one integer tt (1t1051 \le t \le 10^5) — the number of test cases.

The only line of each test case contains three integers nn, xx, yy (2n1052 \le n \le 10^5, 0x,y<n0 \le x, y \lt n).

It is guaranteed that the sum of nn over all test cases doesn't exceed 21052 \cdot 10^5.

Output

Print the answer for each test case, one per line. If there is no result that matches the given information about nn, xx, yy, print 1-1. Otherwise, print n1n-1 space separated integers, where the ii-th integer is the player number of the winner of the ii-th game.

If there are multiple valid results, print any.

Note

In the first test case, player 11 and player 44 won xx times, player 22 and player 33 won yy times.

In the second, third, and fifth test cases, no valid result exists.

Samples

5
5 2 0
8 1 2
3 0 0
2 0 1
6 3 0
1 1 4 4
-1
-1
2 
-1

在线编程 IDE

建议全屏模式获得最佳体验