#include <bits/stdc++.h>
using namespace std;
long long a[200005], n, k;
void unsort(long long l, long long h) {
  if (l + 1 == h or k < 2) return;
  k -= 2;
  long long mid = (l + h) / 2;
  swap(a[mid], a[mid - 1]);
  unsort(l, mid);
  unsort(mid, h);
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> k;
  for (long long i = 0; i < n; i++) a[i] = i + 1;
  if (k % 2 == 0) {
    cout << -1;
    return 0;
  }
  k--;
  unsort(0, n);
  if (k > 0) {
    cout << -1;
    return 0;
  }
  for (long long i = 0; i < n; i++) cout << a[i] << " ";
  return 0;
}
