#!/bin/python import sys q = int(raw_input().strip()) for a0 in xrange(q): len_i,c = raw_input().strip().split(' ') len_i,c = [int(len_i),int(c)] # your code goes here n = len_i -1 temp = [] lst = [i for i in range(1,len_i+1)] lst.sort(reverse=True) max_comparation = (n*(n+1))/2 if max_comparation < c: print -1 elif max_comparation == c: res ="" for i in range(len(lst)): res += str(lst[i]) + " " print res else: i = 0 while c < max_comparation: n -=1 temp.append(lst[i]) lst.pop(i) max_comparation = 1+(n*(n+1))/2 i += 1 res = "" for i in range(len(lst)): res += str(lst[i]) + " " for j in range(len(temp)-1,-1,-1): res += str(temp[j]) + " " print res