import java.io.*; import java.util.*; public class Main { static FastScanner in; static int q; public static void main(String[] args) throws IOException { // System.setOut(new PrintStream(new BufferedOutputStream(new FileOutputStream("nocross.out")), true)); in = new FastScanner(System.in); // in = new FastScanner("nocross.in"); // in = new FastScanner("input.txt"); q = in.nextInt(); while (q-- > 0) { long n = in.nextLong(); long c = in.nextLong(); if (c == n * (n - 1) / 2) { for (long i = n; i >= 1; i--) { System.out.print(i + " "); } } else if (n % 2 == 0) { if (c == n * n / 4) { System.out.print(n / 2 + " "); for (int i = 1; i <= n; i++) { if (i != n / 2) System.out.print(i + " "); } } else { System.out.println(-1); } } else { if (c == (n - 1) * (n + 1) / 4) { System.out.print((n + 1) / 2 + " "); for (int i = 1; i <= n; i++) { if (i != (n + 1) / 2) System.out.print(i + " "); } } else { System.out.println(-1); } } System.out.println(); } } } class FastScanner { BufferedReader br; StringTokenizer tokenizer; FastScanner(String fileName) throws FileNotFoundException { this(new FileInputStream(new File(fileName))); } FastScanner(InputStream is) { br = new BufferedReader(new InputStreamReader(is)); } String nextLine() throws IOException { tokenizer = null; return br.readLine(); } String next() throws IOException { if (tokenizer == null || !tokenizer.hasMoreTokens()) { String line = br.readLine(); if (line == null) { return null; } tokenizer = new StringTokenizer(line); } return tokenizer.nextToken(); } int nextInt() throws IOException { return Integer.parseInt(next()); } long nextLong() throws IOException { return Long.parseLong(next()); } char nextChar() throws IOException { return next().charAt(0); } }