#include <bits/stdc++.h>
using namespace std;
int a[100001];
int l = 1, r, k;
void f(int l, int r) {
  if (r - l + 1 == 1) {
    return;
  }
  if (k == 0) {
    return;
  } else {
    k -= 2;
    int tm = (l + r);
    if (tm % 2 == 0) {
      tm /= 2;
      swap(a[tm - 1], a[tm]);
      f(l, tm - 1);
      f(tm, r);
    } else {
      tm /= 2;
      swap(a[tm], a[tm + 1]);
      f(l, tm);
      f(tm + 1, r);
    }
  }
}
int main() {
  cin >> r >> k;
  if (k % 2 == 0) {
    cout << -1;
    return 0;
  }
  int h = r, cnt = 0;
  while (h >= 1) {
    h /= 2;
    cnt++;
  }
  for (int i = 1; i <= r; ++i) {
    a[i] = i;
  }
  k--;
  f(l, r);
  if (k >= 1) {
    cout << -1;
    return 0;
  }
  for (int i = 1; i <= r; ++i) {
    cout << a[i] << " ";
  }
}
