def main(): import sys input = sys.stdin.read().split() N = int(input[0]) K = int(input[1]) min_sum = N - 1 if N % 2 == 0: max_sum = (N * N - 1) // 2 else: max_sum = (N * N - 3) // 2 if K < min_sum or K > max_sum: print(-1) return if K == min_sum: print(' '.join(map(str, range(1, N+1)))) return D = K - min_sum if N == 2: print(1, 2) return # Construct a permutation with a single large step # Start with 2, 1 and add D+1 step if D + 2 > N: # Not possible with this approach, try another way # For now, construct a minimal permutation with one large step # Try placing the large step in the middle if N % 2 == 0: # Construct a maximal sum permutation and reduce steps to reach K pass else: pass print(-1) return perm = [2, 1, 2 + D] used = {2, 1, 2 + D} for i in range(3, N+1): if i not in used: perm.append(i) # Check if the sum is correct total = 0 for i in range(len(perm) - 1): total += abs(perm[i] - perm[i+1]) if total == K: print(' '.join(map(str, perm))) else: print(-1) if __name__ == "__main__": main()