#include <bits/stdc++.h>
using namespace std;
int n, k, ans[100000] = {};
void solve(int l, int r) {
  if (k == 0 || l >= r - 1) return;
  int m = (r + l) / 2;
  swap(ans[m - 1], ans[m]);
  k--;
  solve(l, m);
  solve(m, r);
}
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) ans[i - 1] = i;
  if (k % 2 == 0) {
    cout << -1 << endl;
    return 0;
  }
  k /= 2;
  solve(0, n);
  if (k)
    cout << -1 << endl;
  else {
    for (int i = 0; i < n; i++) cout << ans[i] << " ";
  }
}
