using System; using System.Collections.Generic; using System.IO; using System.Linq; class Solution { static void Main(String[] args) { int q = Convert.ToInt32(Console.ReadLine()); for(int a0 = 0; a0 < q; a0++){ string[] tokens_len = Console.ReadLine().Split(' '); int len = Convert.ToInt32(tokens_len[0]); //length of array int c = Convert.ToInt32(tokens_len[1]); //number of comparisons int[] ans = Lena(len, c); Console.WriteLine(string.Join(" ", ans)); } } static int[] Lena(int len, int c){ int[] ans = Populate(len); //trivial cases if(c == 0){ return ans; } if(c % len == 0){ return new int[] { -1 }; } //do bubble sort int index = 0; for(int i = 0; i < c; i++){ int nextIndex = (index + 1) % len; int temp = ans[nextIndex]; ans[nextIndex] = ans[index]; ans[index] = temp; index = nextIndex; } return ans; } //populate array in sorted order static int[] Populate(int len){ int[] ans = new int[len]; for(int i = 0; i < len; i++){ ans[i] = i+1; } return ans; } }