#include <bits/stdc++.h>
using namespace std;
int c[100005], d[100005], n, k;
void solve(int s, int t) {
  if (k == 0) {
    for (int i = 1; i <= n; i++) {
      cout << c[i] << " ";
    }
    cout << endl;
    exit(0);
  }
  int mid = (s + t) / 2, pos = s, len = (t - s + 1);
  k -= 2;
  for (int i = mid + 1; i <= t; i++) {
    d[pos++] = c[i];
  }
  for (int i = s; i <= mid; i++) {
    d[pos++] = c[i];
  }
  for (int i = s; i <= t; i++) {
    c[i] = d[i];
  }
  if (len % 2 == 1) {
    if (mid - 1 > s) solve(s, mid - 1);
    if (s < mid) solve(mid, t);
  } else {
    if (mid > s) solve(s, mid);
    if (t > mid + 1) solve(mid + 1, t);
  }
}
int main() {
  cin >> n >> k;
  if (k % 2 == 0 || k > n * 2 - 1) {
    cout << -1 << endl;
    return 0;
  }
  if (k == 1) {
    for (int i = 1; i <= n; i++) {
      cout << i << " ";
    }
    cout << endl;
    return 0;
  }
  if (k == 2 * n - 1) {
    for (int i = n; i >= 1; i--) {
      cout << i << " ";
    }
    cout << endl;
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    c[i] = i;
  }
  k--;
  solve(1, n);
}
