n, k = map(int, input().split()) if k < n - 1: print(-1) exit() ma = n * (n - 1) // 2 if k > ma: print(-1) exit() K = k P = [] P = [n] l = 2 r = n - 1 k -= n - 1 used = [False] * (n + 1) used[n] = True while k > 0: if len(P) % 2 == 1: d = P[-1] - l if d >= k: used[P[-1] - k] = True P.append(P[-1] - k) k = 0 else: used[l] = True P.append(l) l += 1 k -= d else: d = r - P[-1] if d >= k: used[P[-1] + k] = True P.append(P[-1] + k) k = 0 else: used[r] = True P.append(r) r -= 1 k -= d L = [] for i in range(1, n + 1): if not used[i]: L.append(i) ans = L + P print(*ans) tot = 0 for i in range(n - 1): tot += abs(ans[i] - ans[i + 1]) assert tot == K