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