Number game 数字的游戏

Problem Description
One day, QQ is playing a number game. He first sorts the N numbers 1, 2, 3…n, but this is too easy. So long1 wants to challenge QQ’s skill, he let the number sequence becomes wavy. For example, a1a3a5… or a1>a2a4<a5….
Now long1 sorts these wavy sequences by lexicographic order, and he wants to know what the M-th sequence is when you have N numbers.
As an Acmer, long1 thinks you can solve it and gives him the answer.

Input
There are many test cases:
For every case:

First line is the number of case
The next case lines:
Every line contains two numbers N, and M.(1<=N<=20,M is not larger than the number of wavy sequences)

Output
For every case, output the sequence.

Sample Input
2
2 1
3 3

Sample Output
1 2
2 3 1