#include <bits/stdc++.h>
using namespace std;
const int MX = 1000000;
const int inf = 1e9;
const long long mod = 1e9 + 7;
int a[MX];
bitset<MX * 250> f;
int ck(int n, int x, int i) {
  int xx = 0;
  for (int j = 1; j < i; j++) {
    if (x - a[j] > a[j] && f[x - a[j]]) xx++;
  }
  return xx;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m, tc, cs = 1;
  cin >> n >> m;
  long long xx = 0;
  for (int i = 3; i <= n; i++) {
    xx += (i - 1) / 2;
  }
  if (m > xx) {
    cout << -1 << endl;
    return 0;
  }
  xx = 0;
  for (int i = 1; i <= n; i++) {
    if (i <= 2) {
      a[i] = i;
      f[i] = true;
      continue;
    }
    int lo = a[i - 1] + 1, hi = 250 * MX, rs = -1, mx = 0;
    while (lo <= hi) {
      int md = (lo + hi) / 2;
      int r = ck(n, md, i);
      if (r <= m)
        rs = md, hi = md - 1;
      else
        lo = md + 1;
    }
    a[i] = rs;
    m -= ck(n, rs, i);
    f[rs] = true;
  }
  for (int i = 1; i <= n; i++) cout << a[i] << ' ';
  cout << endl;
  return 0;
}
