#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 9;
int a[MAX_N];
void mergesort(int l, int r, int &k, int &remain) {
  if (k > 0 && r - l > 1) {
    k -= 2;
    int m = (l + r) / 2;
    mergesort(l, m, k, remain);
    mergesort(m, r, k, remain);
  } else {
    int c = r - l;
    for (int i = 0; i < c; i++) {
      a[l + i] = remain - c + i + 1;
    }
    remain -= c;
  }
}
int main() {
  int n, k;
  cin >> n >> k;
  if (k % 2 == 0 || k > 2 * n - 1) {
    return !printf("-1");
  }
  int remain = n;
  k -= 1;
  mergesort(0, n, k, remain);
  for (int i = 0; i < n; i++) {
    printf("%d ", a[i]);
  }
}
