#include <bits/stdc++.h>
using namespace std;
int n, k, ans[100005];
void solve(int l, int r) {
  if (l == r || k <= 0) {
    return;
  }
  k -= 2;
  int mid = (l + r + 1) / 2;
  int u = ans[mid - 1];
  ans[mid - 1] = ans[mid];
  ans[mid] = u;
  solve(l, mid - 1);
  solve(mid, r);
}
int main() {
  scanf("%d%d", &n, &k);
  if (!(k % 2)) {
    printf("-1");
    return 0;
  }
  for (int i = 0; i <= n - 1; i++) {
    ans[i] = i + 1;
  }
  k--;
  solve(0, n - 1);
  if (k) {
    printf("-1");
  } else {
    for (int i = 0; i <= n - 1; i++) {
      printf("%d ", ans[i]);
    }
  }
  return 0;
}
