#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 5;
const long long mod = 99999997;
long long a[maxn], k, n;
void dfs(long long l, long long r) {
  if (l + 1 >= r || !k) return;
  long long mid = (l + r) / 2;
  k -= 2;
  swap(a[mid - 1], a[mid]);
  dfs(l, mid);
  dfs(mid, r);
}
int main() {
  cin >> n >> k;
  if (k > 2 * n - 1 || k % 2 == 0) {
    cout << "-1" << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    a[i] = i + 1;
  }
  k--;
  dfs(0ll, n);
  for (int i = 0; i < n; i++) cout << a[i] << ' ';
}
