Consider a permutation, , of integers from to . Let's determine the of to be the minimum absolute difference between any consecutive integers in :
Generate a lexicographically sorted list of all permutations of length having a maximal distance between all permutations of the same length. Print the lexicographically permutation.
Input Format
The first line contains an integer, (the number of test cases).
The subsequent lines each contain two space-separated integers, (the permutation length) and (the 1-based index in the list of permutations having a maximal distance), respectively. The line corresponds to the test case.
Note: It is guaranteed that the sum of all does not exceed .
Constraints
Output Format
For each test case: if the list of permutations having maximal distance has at least elements, print the permutation as sequential (i.e.: from to ) space-separated integers on a new line; otherwise, print .
Sample Input
3
3 5
4 2
4 3
Sample Output
3 1 2
3 1 4 2
-1
Explanation
For and :
Each of the permutations has distance . We choose the fifth one (because ), and print 3 1 2
on a new line.
For and :
The maximal distance in the list of permutations of integers from to is , and the only permutations having that distance are and . We choose the second one (because ), and print 3 1 4 2
on a new line.