A sequence of length nn is called a permutation if and only if it's composed of the first nn positive integers and each number appears exactly once.
Here we define the "difference sequence" of a permutation p1,p2,…,pnp1,p2,…,pn as p2−p1,p3−p2,…,pn−pn−1p2−p1,p3−p2,…,pn−pn−1. In other words, the length of the difference sequence is n−1n−1 and the ii-th term is pi+1−pipi+1−pi
Now, you are given two integers N,KN,K. Please find the permutation with length NNsuch that the difference sequence of which is the KK-th lexicographically smallest among all difference sequences of all permutations of length NN.
Input
The first line contains one integer TT indicating that there are TT tests.
Each test consists of two integers N,KN,K in a single line.
* 1≤T≤401≤T≤40
* 2≤N≤202≤N≤20
* 1≤K≤min(104,N!)
Output
For each test, please output NN integers in a single line. Those NN integers represent a permutation of 11 to NN, and its difference sequence is the KK-th lexicographically smallest.