#include <bits/stdc++.h>
int arr[100005];
int k;
void unsort(int left, int right) {
  if (k <= 0 || left >= right - 1) return;
  int mid = (left + right) / 2;
  std::swap(arr[mid - 1], arr[mid]);
  --k;
  unsort(left, mid);
  unsort(mid, right);
}
int main() {
  int n;
  scanf("%d%d", &n, &k);
  if (k % 2 == 0 || k > 2 * n) {
    printf("-1\n");
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    arr[i] = i + 1;
  }
  k /= 2;
  unsort(0, n);
  for (int i = 0; i < n; ++i) {
    printf("%d ", arr[i]);
  }
  printf("\n");
  return 0;
}
