A permutation of length $$$n$$$ is an array of $$$n$$$ integers, where each number from $$$1$$$ to $$$n$$$ appears exactly once. An inversion in a permutation $$$p$$$ is a pair of indices $$$(i, j)$$$ such that $$$i \lt j$$$ and $$$p_i \gt p_j$$$.
For a permutation $$$p$$$, we define its inversion value as the number of its subsegments that contain at least one inversion. Formally, this is the number of pairs of integers $$$(l, r)$$$ ($$$1 \le l \lt r \le n$$$) for which there exists a pair of indices $$$(i, j)$$$ satisfying the following conditions: $$$l \le i \lt j \le r$$$ and $$$p_i \gt p_j$$$.
For example, for the permutation $$$[3, 1, 4, 2]$$$, the inversion value is $$$5$$$.
You are given two integers $$$n$$$ and $$$k$$$. Your task is to construct a permutation of length $$$n$$$ with an inversion value equal to exactly $$$k$$$.
The first line contains one integer $$$t$$$ ($$$1 \le t \le 500$$$) — the number of test cases.
Each test case consists of a single line containing two integers $$$n$$$ and $$$k$$$ ($$$2 \le n \le 30$$$; $$$0 \le k \le \dfrac{n(n-1)}{2}$$$).
For each test case, output the answer as follows:
54 55 105 06 83 1
3 1 4 2 5 4 3 2 1 1 2 3 4 5 2 3 5 6 1 4 0
| Name |
|---|


