Constructive Kingdom is still chasing Little T...
Define the prefix $$$\max$$$ sequence $$$x$$$ of a sequence $$$a$$$ of length $$$n$$$ as $$$x_i = \max\{a_j : 1 \le j \le i\}$$$, and the prefix $$$\min$$$ sequence $$$y$$$ as $$$y_i = \min\{a_j : 1 \le j \le i\}$$$.
Given $$$n$$$ and $$$k$$$, please construct two sequences $$$a$$$ and $$$b$$$, both of length $$$n$$$, that satisfy the following conditions. If no such two sequences exist, report that there is no solution:
The first line contains an integer $$$T$$$ ($$$1 \le T \le 10^5$$$), indicating the number of test cases.
Each test case consists of a single line containing two integers $$$n$$$ and $$$k$$$ ($$$2 \le n \le 10^5, 0 \le k \le 10^{10}$$$), representing the length of the sequences and the required sum of differences between the prefix $$$\max$$$ and $$$\min$$$.
It is guaranteed that $$$\sum n \le 3 \times 10^5$$$ over all test cases.
For each test case, if there exist two sequences satisfying the conditions, output two lines.
The first line should contain $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$, representing your constructed sequence $$$a$$$.
The second line should contain $$$n$$$ integers $$$b_1, b_2, \ldots, b_n$$$, representing your constructed sequence $$$b$$$.
If no such two sequences exist, output a single line containing the integer $$$-1$$$.
If there are multiple valid answers, you may output any of them.
32 12 05 12
1 2 2 1 -1 1 3 4 2 5 1 2 4 5 3
For the 3rd testcase, let's verify if a hypothetical sequence $$$b = \{1, 2, 4, 5, 3\}$$$ satisfies the conditions:
Additional Notes
A permutation of $$$1$$$ to $$$n$$$ is a sequence of length $$$n$$$ in which every integer from $$$1$$$ to $$$n$$$ appears exactly once.
| Name |
|---|


