#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300 * 1000 + 10;
int n, k, ary[MAXN];
void make(int l, int r) {
  if (k <= 0) return;
  if (l + 1 == r) return;
  int m = (l + r) / 2;
  swap(ary[m - 1], ary[m]);
  k -= 2;
  make(l, m);
  make(m, r);
}
int main() {
  cin >> n >> k;
  k--;
  for (int i = 0; i < n; i++) ary[i] = i + 1;
  make(0, n);
  if (k != 0) {
    cout << "-1" << endl;
  } else {
    for (int i = 0; i < n; i++) cout << ary[i] << " ";
    cout << endl;
  }
  return 0;
}
