#!/bin/python import sys from collections import deque comparisons = 0 def lena_sort(nums): global comparisons if len(nums) <= 1: return nums pivot = nums[0]; less = []; more = []; for i in xrange(1, len(nums)): # Comparison comparisons += 1 if nums[i] < pivot: less.append(nums[i]) else: more.append(nums[i]) sorted_less = lena_sort(less) sorted_more = lena_sort(more) ans = sorted_less + [pivot] + sorted_more return ans q = int(raw_input().strip()) for a0 in xrange(q): l,c = raw_input().strip().split(' ') l,c = [int(l),int(c)] max_c = ((l-1)*l)/ 2 if c == 0 and l == 1: print 1 continue elif c > max_c or c < l-1: print -1 continue a = deque(xrange(1, l+1)) for i in xrange((l/2)+1): a.rotate(1) la = list(a) comparisons = 0 lena_sort(la) if c == comparisons: print ' '.join(map(str, la)) break