#include <bits/stdc++.h>
using namespace std;
void read(int &x) { scanf("%d", &x); }
void print(int x) { printf("%d ", x); }
void println(int x) { printf("%lld\n", x); }
int n, k, a[111111];
void f(int l, int r, int k) {
  assert(k >= 1);
  if (k == 1) {
    for (int i = l; i <= r; i++) print(i);
    return;
  }
  k--;
  int mid = (l + r) / 2;
  f(mid + 1, r, min(a[r - mid], k - 1));
  f(l, mid, max(k - a[r - mid], 1));
}
int main() {
  cin >> n >> k;
  if (k % 2 == 0) {
    cout << -1;
    return 0;
  }
  a[1] = 1;
  for (int i = 2; i <= n; i++) a[i] = a[i / 2] + a[(i + 1) / 2] + 1;
  if (a[n] < k) {
    cout << -1;
    return 0;
  }
  f(1, n, k);
}
