B. Bring It To Back
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Jack is playing a game with his cat, Salmon. On a shelf, Jack has comic books labeled from volume $$$1$$$ to volume $$$N$$$, arranged in some order from left to right. All books are identical in size.

Jack and Salmon will repeat the following sequence of moves exactly $$$M$$$ times (where $$$M$$$ may be zero):

  1. Jack chooses one comic book that is not the rightmost book and knocks it to the ground.
  2. He then closes the gap by shifting all books to the right of that position leftward to fill the space, leaving the empty spot at the rightmost end of the shelf.
  3. Finally, Salmon picks up the fallen book and places it into the gap at the rightmost position.

Your task is to determine the lexicographically largest initial arrangement of the books such that, after performing exactly $$$M$$$ sets of moves as described, there exists a sequence of choices for Jack that results in the books being sorted in ascending order from volume $$$1$$$ to volume $$$N$$$ from left to right.

Two different arrangements $$$A$$$ and $$$B$$$ of $$$N$$$ books are compared lexicographically as follows: $$$A$$$ is said to be lexicographically larger than $$$B$$$ if, at the first position $$$i$$$ from left side where they differ, $$$A_i \gt B_i$$$.

Input

Input The first line contains a single integer $$$T$$$ ($$$1 \le T \le 10^5$$$) — the number of test cases.

Each test case consists of a single line containing two integers $$$N$$$ and $$$M$$$ ($$$1 \le N \le 10^5$$$, $$$1 \le M \le 10^9$$$) — the number of comic books on the shelf and the number of sets of moves performed, respectively.

It is guaranteed that the sum of $$$N$$$ over all test cases does not exceed $$$10^5$$$.

Output

For each test case, print $$$N$$$ integers — the lexicographically largest initial order of the books that will result in the volumes being arranged as $$$1, 2, \ldots, N$$$ after exactly $$$M$$$ moves if Jack chooses the books optimally.

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

In the first test case, Jack can knock down book number $$$3$$$, and Salmon inserts it at the rightmost position, resulting in [ 1 2 3. ]

Another possible initial arrangement is 1 3 2, but the output is lexicographically larger.

The initial arrangement 1 2 3 is not possible: knocking down book $$$1$$$ gives 2 3 1, and knocking down book $$$2$$$ gives 1 3 2.