Problem: Seiji Maki doesn't only like to observe relationships being unfolded, he also likes to observe sequences of numbers, especially permutations. Today, he has his eyes on almost sorted permutations.

A permutation a_1, a_2, ..., a_n of 1, 2, ..., n is said to be almost sorted if the condition a_{i + 1} ≥ a_i - 1 holds for all i between 1 and n - 1 inclusive.

Maki is considering the list of all almost sorted permutations of 1, 2, ..., n, given in lexicographical order, and he wants to find the k-th permutation in this list. Can you help him to find such permutation?

Permutation p is lexicographically smaller than a permutation q if and only if the following holds:

  * in the first position where p and q differ, the permutation p has a smaller element than the corresponding element in q.

Input

The first line contains a single integer t (1≤ t≤ 1000) — the number of test cases.

Each test case consists of a single line containing two integers n and k (1 ≤ n ≤ 10^5, 1 ≤ k ≤ 10^{18}).

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

Output

For each test case, print a single line containing the k-th almost sorted permutation of length n in lexicographical order, or -1 if it doesn't exist.

Example

Input


5
1 1
1 2
3 3
6 5
3 4


Output


1 
-1
2 1 3 
1 2 4 3 5 6 
3 2 1 

Note

For the first and second test, the list of almost sorted permutations with n = 1 is \{[1]\}.

For the third and fifth test, the list of almost sorted permutations with n = 3 is \{[1, 2, 3], [1, 3, 2], [2, 1, 3], [3, 2, 1]\}.

Solution (in JAVA):

Solution:
import java.io.DataInputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.LinkedList;

public class E {

    private static void run() throws IOException {
        int i_n = in.nextInt();
        long i_k = in.nextLong();

        LinkedList<Node> ans = new LinkedList<>();
        int n = i_n;
        long k = i_k;
        while (k != 0) {
            int now = first_pos_changed(n, k);
            if (now == -1) {
                out.println(-1);
                return;
            }

            k = k - dp[now - 1][0];
            boolean flag = false;
            for (int i = 2; i <= now; i++) {
                int next_pos = first_pos_changed(now - i, k);
                if (next_pos != -1) {
                    ans.add(new Node(now, i));
                    n = now - i;
                    flag = true;
                    break;
                }

                k -= dp[now - i][0];
            }
            if (!flag) {
                ans.add(new Node(now, now));
            }
        }

        n = i_n;
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = i + 1;
        }

        for (Node now : ans) {
            int start = n - now.pos;
            int start_value = start + now.length;
            for (int i = 0; i < now.length; i++) {
                a[start + i] = start_value - i;
            }
        }

        print_array(a);
    }

    static int first_pos_changed(int n, long k) {
        for (int i = 1; i <= n; i++) {
            if (k <= dp[i][0]) {
                return i;
            }
        }
        return -1;
    }

    static class Node {
        int pos, length;

        public Node(int pos, int length) {
            this.pos = pos;
            this.length = length;
        }
    }

    static final int max_n = 100000;
    static long[][] dp = new long[max_n + 1][2];

    private static void init() {
        dp[0][0] = 1;
        dp[1][0] = 1;
        dp[1][1] = 0;
        for (int i = 2; i <= 65; i++) {
//            dp[i][1] = 1;
//            for (int j = 1; j <= i - 2; j++) {
//                dp[i][1] += dp[j][0];
//            }
//            dp[i][0] = dp[i][1] + dp[i - 1][0];
            dp[i][1] = (1L << (i - 2));
            dp[i][0] = (1L << (i - 1));
        }
    }

    public static void main(String[] args) throws IOException {
        in = new Reader();
        out = new PrintWriter(new OutputStreamWriter(System.out));

        init();

        int t = in.nextInt();
        for (int i = 0; i < t; i++) {
            run();
        }

        out.flush();
        in.close();
        out.close();
    }

    private static int gcd(int a, int b) {
        if (a == 0 || b == 0)
            return 0;
        while (b != 0) {
            int tmp;
            tmp = a % b;
            a = b;
            b = tmp;
        }
        return a;
    }

    static final long mod = 1000000007;

    static long pow_mod(long a, long b) {
        long result = 1;
        while (b != 0) {
            if ((b & 1) != 0) result = (result * a) % mod;
            a = (a * a) % mod;
            b >>= 1;
        }
        return result;
    }

    private static long multiplied_mod(long... longs) {
        long ans = 1;
        for (long now : longs) {
            ans = (ans * now) % mod;
        }
        return ans;
    }

    @SuppressWarnings("FieldCanBeLocal")
    private static Reader in;
    private static PrintWriter out;

    private static void print_array(int[] array) {
        for (int now : array) {
            out.print(now);
            out.print(' ');
        }
        out.println();
    }

    private static void print_array(long[] array) {
        for (long now : array) {
            out.print(now);
            out.print(' ');
        }
        out.println();
    }

    static class Reader {
        private static final int BUFFER_SIZE = 1 << 16;
        private final DataInputStream din;
        private final byte[] buffer;
        private int bufferPointer, bytesRead;

        Reader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException {
            final byte[] buf = new byte[1024]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n') {
                    break;
                }
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextSign() throws IOException {
            byte c = read();
            while ('+' != c && '-' != c) {
                c = read();
            }
            return '+' == c ? 0 : 1;
        }

        private static boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        public int skip() throws IOException {
            int b;
            // noinspection ALL
            while ((b = read()) != -1 && isSpaceChar(b)) {
                ;
            }
            return b;
        }

        public char nc() throws IOException {
            return (char) skip();
        }

        public String next() throws IOException {
            int b = skip();
            final StringBuilder sb = new StringBuilder();
            while (!isSpaceChar(b)) { // when nextLine, (isSpaceChar(b) && b != ' ')
                sb.appendCodePoint(b);
                b = read();
            }
            return sb.toString();
        }

        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            final boolean neg = c == '-';
            if (neg) {
                c = read();
            }
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg) {
                return -ret;
            }
            return ret;
        }

        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            final boolean neg = c == '-';
            if (neg) {
                c = read();
            }
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg) {
                return -ret;
            }
            return ret;
        }

        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            final boolean neg = c == '-';
            if (neg) {
                c = read();
            }

            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg) {
                return -ret;
            }
            return ret;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1) {
                buffer[0] = -1;
            }
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead) {
                fillBuffer();
            }
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            din.close();
        }

    }
}