n,k = map(int, input().split()) fst = [0] bst = [] f = True k -= n-1 if k < 0: print(-1) exit() for i in range(n-1, 0, -1): if k < i-1: break if f: bst.append(n-i) else: fst.append(n-i) k -= i-1 f = not f else: if k: print(-1) exit() i = 0 #print(f, i) if f: for i in range(n-i, n-k-1): fst.append(i) if i != 0: fst.append(n-1) for i in range(n-k-1, n-1): fst.append(i) else: for i in range(n-i, n-k-1): bst.append(i) if i != 0: bst.append(n-1) for i in range(n-k-1, n-1): bst.append(i) ans = [0] * n bst.reverse() st = fst + bst #print(st) for i in range(n): ans[st[i]] = i+1 print(*ans)