#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int p[N], n, cnt, k;
void unsort(int l, int r) {
  if (cnt == k) return;
  if (l < r - 1) {
    int m = (l + r) / 2;
    swap(p[m - 1], p[m]);
    cnt += 2;
    unsort(l, m);
    unsort(m, r);
  }
}
int main() {
  cin >> n >> k;
  if (k % 2 == 0)
    cout << -1;
  else {
    for (int i = 0; i < n; i++) p[i] = i + 1;
    cnt = 1;
    unsort(0, n);
    if (cnt != k)
      cout << -1;
    else
      for (int i = 0; i < n; i++) cout << p[i] << " ";
  }
}
