"""

"""

import sys
from sys import stdin
import itertools
from collections import deque

N,K = map(int,stdin.readline().split())
OK = K

if K < N-1:
    print (-1)
    sys.exit()

q = deque([i+1 for i in range(N)])

l = [1]
q.popleft()
r = [N]
q.pop()
K -= N-1

rem = []

cnt = 0
while q:

    if cnt % 2 == 0:
        x = q.popleft()
        if K-abs(r[-1]-x) >= 0:
            K -= abs(r[-1]-x)
            r.append(x)
        elif (K-abs(l[-1]-x) == 0):
            K -= abs(l[-1]-x)
            l.append(x)
        else:
            rem.append(x)

        if len(q) == 0:
            break
        x = q.pop()
        if K-abs(l[-1]-x) >= 0:
            K -= abs(l[-1]-x)
            l.append(x)
        elif (K-abs(r[-1]-x) == 0):
            K -= abs(r[-1]-x)
            r.append(x)
        else:
            rem.append(x)

    else:

        x = q.pop()
        if K-abs(r[-1]-x) >= 0:
            K -= abs(r[-1]-x)
            r.append(x)
        elif (K-abs(l[-1]-x) == 0):
            K -= abs(l[-1]-x)
            l.append(x)
        else:
            rem.append(x)

        if len(q) == 0:
            break
        x = q.popleft()
        if K-abs(l[-1]-x) >= 0:
            K -= abs(l[-1]-x)
            l.append(x)
        elif (K-abs(r[-1]-x) == 0):
            K -= abs(r[-1]-x)
            r.append(x)
        else:
            rem.append(x)

    cnt += 1

if K != 0:
    print (-1)
    sys.exit()

rem.sort()
l.reverse()

ans = l + rem + r
print (*ans)


check = 0
for i in range(N-1):
    check += abs(ans[i]-ans[i+1])
assert check == OK

"""
p = itertools.permutations([i+1 for i in range(N)], N)
maxi = 0

for np in p:
    
    lis = list(np)
    now = 0

    for i in range(N-1):
        now += abs(lis[i+1]-lis[i])

    print (now,lis)
    maxi = max(now,maxi)

print (maxi)
"""