#include <bits/stdc++.h>
using namespace std;
long long n, k;
long long a[100005], cnt = 1;
void f(long long l, long long r) {
  if (cnt == k) return;
  if (r - l == 1) return;
  cnt += 2;
  long long mid = (l + r) / 2;
  swap(a[mid - 1], a[mid]);
  f(l, mid);
  if (cnt == k) return;
  f(mid, r);
}
void solve() {
  cin >> n >> k;
  for (long long i = 0; i < n; i++) a[i] = i + 1;
  f(0, n);
  if (cnt != k) {
    cout << -1;
    return;
  }
  for (long long i = 0; i < n; i++) cout << a[i] << " ";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
