#include <bits/stdc++.h>
using namespace std;
int A[100010], B[100010], n, k, cnt = 0, MAX = -1;
void MS(int l, int r) {
  if (r - l < 2) return;
  int M = l + r >> 1;
  if (cnt < k) {
    cnt += 2;
    int c = 0, g;
    for (int i = l; i < M; i++) {
      B[c] = A[r - 1 - c];
      c++;
    }
    g = c;
    c = 0;
    for (int i = M; i < r; i++) {
      A[r - 1 - c] = A[l + (r - M - 1 - c)];
      c++;
    }
    for (int i = l; i < M; i++) {
      A[i] = B[g - 1 + l - i];
    }
  } else {
    return;
  }
  MS(l, M);
  MS(M, r);
}
int main() {
  scanf("%d%d", &n, &k);
  if (k % 2 == 0)
    cout << -1;
  else {
    for (int i = 0; i < n; i++) A[i] = i + 1;
    cnt++;
    MS(0, n);
    if (cnt < k)
      cout << -1;
    else {
      for (int i = 0; i < n; i++) cout << A[i] << ' ';
    }
  }
}
