def main(): import sys input = sys.stdin.read().split() N = int(input[0]) K = int(input[1]) if N == 1: print(1 if K == 0 else -1) return # Compute S_max if N % 2 == 0: S_max = (N * N) // 2 - 1 else: S_max = (N * N - 3) // 2 min_sum = N - 1 if K < min_sum or K > S_max or (S_max - K) % 2 != 0: print(-1) return # Construct maximum permutation if N % 2 == 0: mid = N // 2 p = [] low = mid high = N for _ in range(mid): p.append(low) p.append(high) low -= 1 high -= 1 else: mid = (N + 1) // 2 p = [mid] high = N low = mid - 1 direction = 1 # 1 for high, 0 for low for _ in range(N - 1): if direction == 1: p.append(high) high -= 1 else: p.append(low) low -= 1 direction ^= 1 x = (S_max - K) // 2 # Perform x swaps to reduce sum by 2 each for i in range(x): pos = 2 * i + 1 if pos + 1 >= len(p): break p[pos], p[pos + 1] = p[pos + 1], p[pos] print(' '.join(map(str, p))) if __name__ == "__main__": main()