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