#include <bits/stdc++.h>
const int maxn = 100000;
int n, k;
int a[maxn + 5];
using namespace std;
void mergesort(int l, int r) {
  if (k == 0 || r - l == 1) return;
  int mid = (l + r) / 2;
  k -= 2;
  swap(a[mid - 1], a[mid]);
  mergesort(mid, r);
  mergesort(l, mid);
}
int main() {
  scanf("%d%d", &n, &k);
  if (2 * n - 1 < k || (k % 2 == 0))
    printf("-1\n");
  else {
    k--;
    for (int i = 0; i < n; i++) a[i] = i + 1;
    mergesort(0, n);
    for (int i = 0; i < n; i++) {
      if (i == n - 1)
        printf("%d\n", a[i]);
      else
        printf("%d ", a[i]);
    }
  }
  return 0;
}
