import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static int c = 0; static List lena_sort(List nums) { if (nums.size() <= 1) { return nums; } int pivot = nums.get(0); List less = new ArrayList<>(); List more = new ArrayList<>(); for (int j = 1; j < nums.size(); ++j) { Integer i = nums.get(j); c++; // Comparison if (i < pivot) less.add(i); else more.add(i); } List ans = lena_sort(less); ans.add(pivot); ans.addAll(lena_sort(more)); return ans; } static StringBuilder sb = new StringBuilder(256000); static void test1(final int L, final int Ci) { long st = System.nanoTime(); Random r = new Random(); Set set = new HashSet(L); List l2 = new ArrayList<>(); do { set.clear(); while (set.size() < L) set.add(r.nextInt(100)); l2.clear(); l2.addAll(set); Collections.shuffle(l2); c = 0; lena_sort(l2); if (System.nanoTime() - st > 3500000000L) break; } while (c != Ci); //System.out.println("c:" + c + "<>Ci:"+Ci); if (c != Ci) { System.out.println("-1"); } else { sb.setLength(0); for (Integer inn : l2) { sb.append(inn); sb.append(' '); } sb.setLength(sb.length()-1); System.out.println(sb); } //System.out.println(L + ": "+ Collections.min(cs) + "-" + Collections.max(cs)); } // 1 3 5 7 9 11 static int mins[] = {0, 1, 2, 4, 6, 8, 10, 13, 16, 19, 22}; static int maxs[] = {0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55}; 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(); if (len <= mins.length) { if (c < mins[len - 1] || c > maxs[len - 1]) System.out.println("-1"); else test1(len, c); } else if (c < (len * 2) || c > len * 5) System.out.println("-1"); else test1(len, c); // your code goes here } } }