B. Alya and Permutation Revisited
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Given integers $$$n$$$ and $$$k$$$, construct a permutation $$$p$$$ of integers $$$1 ... n$$$ that maximizes the value of $$$k$$$ after the following process.

Perform $$$n$$$ operations, on the $$$i$$$-th operation ($$$i = 1, 2, ..., n$$$)

  • It if $$$i$$$ is odd, $$$k := p_i \cdot k$$$.
  • if $$$i$$$ is even, $$$k := \lfloor \frac{k}{p_i} \rfloor$$$.
Input

The first line contains a single integer $$$t$$$ ($$$1 \le t \le 500$$$) – the number of test cases.

The only line of each test case contains two integers $$$n$$$ and $$$k$$$ ($$$1 \le n, k \le 10^5$$$).

The sum of $$$n$$$ over all test cases doesn't exceed $$$10^5$$$.

Output

For each test case, output the permutation $$$p_1, p_2, ..., p_n$$$ on a single line.

If there are multiple such permutations, output any.

Example
Input
2
1 3
2 4
Output
1 
2 1 
Note

In the first test case, $$$n = 1$$$, so there is only one permutation.

In the second test case, it is optimal to multiply $$$k$$$ by $$$2$$$ first and then divide it by $$$1$$$.