#include <bits/stdc++.h>
using namespace std;
long long n, k;
long long a[2000010];
void rec(long long l, long long r) {
  if (k < 0) {
    cout << -1;
    exit(0);
  }
  if ((l + 1) == r) return;
  long long mid = (l + r) / 2;
  if (k == 0) return;
  swap(a[mid - 1], a[mid]);
  k -= 2;
  rec(l, mid);
  rec(mid, r);
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> k;
  for (long long i = 0; i < n; i++) {
    a[i] = i + 1;
  }
  --k;
  rec(0, n);
  if (k) {
    cout << -1 << endl;
    return 0;
  }
  rec(0, n);
  for (long long i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  return 0;
}
