#include <bits/stdc++.h>
int a[100005], cnt = 0, n, k;
void Merge(int a[], int l, int m, int r) {
  int aux[100005];
  int i, j, k;
  for (i = m + 1; i > l; i--) aux[i - 1] = a[i - 1];
  for (j = m; j < r; j++) aux[m + r - j] = a[j + 1];
  for (k = l; k <= r; k++) {
    if (aux[j] < aux[i] || i > m)
      a[k] = aux[j--];
    else
      a[k] = aux[i++];
  }
  cnt++;
}
void Mergesort(int a[], int l, int r) {
  int m;
  if (r <= l)
    return;
  else {
    m = (l + r - 1) / 2;
    Mergesort(a, l, m);
    Mergesort(a, m + 1, r);
    if (cnt == n - 1 - k / 2) return;
    Merge(a, l, m, r);
  }
}
int main() {
  int i;
  scanf("%d%d", &n, &k);
  for (i = 0; i < n; i++) a[i] = n - i;
  if (k >= 2 * n || k % 2 == 0)
    printf("-1\n");
  else {
    Mergesort(a, 0, n - 1);
    for (i = 0; i < n - 1; i++) printf("%d ", a[i]);
    printf("%d\n", a[n - 1]);
  }
  return 0;
}
