#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
int n, a[N], k, cnt;
void Merge(int l, int r) {
  if (r <= l + 1) return;
  int mid = (l + r) / 2;
  if (cnt < k) {
    cnt += 2;
    swap(a[mid - 1], a[mid]);
    Merge(l, mid);
    Merge(mid, r);
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; ++i) a[i] = i + 1;
  if (k % 2 == 0) {
    printf("-1");
    return 0;
  }
  cnt = 1;
  Merge(0, n);
  if (cnt < k) {
    printf("-1");
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    printf("%d ", a[i]);
  }
  return 0;
}
