import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int q = in.nextInt(); for(int a0 = 0; a0 < q; a0++){ int len = in.nextInt(); int c = in.nextInt(); // your code goes here if (c == 0) { //bestest case scenario: already sorted! for (int i = 1; i <= len; i++) { System.out.print(i); if (i < len) System.out.print(" "); else System.out.println(); } } else { int max = ((len - 1) * len) / 2; if (max < c) System.out.println("-1"); else if (max == c) { //worst case scenario: sorted in descending order for (int i = len; i > 0; i--) { System.out.print(i); if (i > 1) System.out.print(" "); else System.out.println(); } } else { int min = 0; //if length is even, best case is sum of all smaller odds, and viceversa if (len % 2 == 0) for (int i = 1; i < len; i += 2) min += i; else for (int i = 2; i < len; i += 2) min += i; if (c < min) System.out.println("-1"); else if (c == min) { //best case scenario possible for this problem: sorted in descending order in groups of 2 for (int i = len; i > 0; i -= 2) { if (i == 1) System.out.println("1"); else { System.out.print((i - 1) + " " + i); if (i > 2) System.out.print(" "); else System.out.println(); } } } else { //the trickiest part is to get permutations in between } } } } } }