For a permutation P = (p1, p2, ..., pN) of numbers [1, 2, ..., N], we define the function f(P) = max(p1, p2) + max(p2, p3) + ... + max(pN-1, pN).
You are given N and an integer K. Find and report a permutation P of [1, 2, ..., N] such that f(P) = K, if such a permutation exists.
Note f([1]) = 0.

-----Input-----
- The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
- The only line of each test case consists of two space-separated integers N, K respectively.

-----Output-----
For each test case, if a permutation satisfying the condition exists, output a single line containing N space-separated integers which denotes any such permutation. If no such permutation exists, output a single integer -1 instead.
Use fast I/O methods since the size of the output is large.

-----Constraints-----
- 1 ≤ T ≤ 40
- 1 ≤ N ≤ 105
- Sum of N over all test cases in each file ≤ 106
- 0 ≤ K ≤ 2 * 1010

-----Example-----
Input:
3
4 12
2 2
5 14

Output:
-1
1 2
5 4 3 2 1

-----Explanation-----
Example 1. There doesn't exist any permutation of numbers [1, 2, 3, 4] that can have its f value equal to 4. Hence answer is -1.
Example 2. The permutations [1, 2] and [2, 1] both have their f values equal to 2. You can print any of these two permutations. 
Example 3. The permutation [5, 4, 3, 2, 1]
has f value = max(5, 4) + max(4, 3) + max(3, 2) + max(2, 1) = 5 + 4 + 3 + 2 = 14.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = "# cook your dish here\nfor i in range(int(input())):\n    n,k=[int(i) for i in input().split()]\n    if(n%2==0):\n     if(k<(n*(n+1))//2 - 1  or  k>3*((n//2)**2) - 1):print(-1)\n     elif(k==(n*(n+1))//2 - 1):\n      for i in range(1,n+1):print(i,'',end='')\n      print()\n     else:\n      k,count,p,l,x = k-(n*(n+1))//2 + 1,0,0,[0 for i in range(n)],1\n      while(k>0):p+=2 ;k,count = k-n+p ,count+1\n      for i in range(n,n-count+1,-1):l[x]=i ;x+=2\n      k=-k ;l[2*count - 1 +k],p = n-count+1 ,1\n      for i in range(n):\n       if(l[i]==0):l[i]=p ;   p+=1 \n      for i in l:print(i,'',end='')\n      print()\n    else:\n     if(n==1):print(1) if(k==0) else print(-1)                \n     elif(k<(n*(n+1))//2 - 1  or k>3*(n//2)*(n//2 + 1)):print(-1)\n     elif(k==(n*(n+1))//2 - 1):\n      for i in range(1,n+1):print(i,'',end='')\n      print()\n     else:\n      k,count,p,l,x = k-(n*(n+1))//2 + 1,0,0,[0 for i in range(n)],1\n      while(k>0):  p+=2 ;  k,count = k-n+p ,count+1"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13987