#include <bits/stdc++.h>
using namespace std;
int n, k, a[100010];
void get(int l, int r) {
  if (r - l > 1 && k != 0) {
    k -= 2;
    int mid = (r + l) >> 1;
    swap(a[mid - 1], a[mid]);
    get(l, mid);
    get(mid, r);
  }
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    a[i] = i + 1;
  }
  k--;
  if (k % 2 != 0) {
    cout << -1;
  } else {
    get(0, n);
    if (k != 0) {
      cout << -1;
    } else {
      for (int i = 0; i < n; i++) cout << a[i] << " ";
    }
  }
  return 0;
}
