#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
int a[100000 + 10], k, n;
void solve(int l, int r) {
  if (l + 1 == r) return;
  int mid = (l + r) / 2;
  if (k > 0) {
    k -= 2;
    swap(a[mid - 1], a[mid]);
    solve(l, mid);
    solve(mid, r);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> k;
  k--;
  if (k % 2 == 1)
    cout << -1;
  else {
    for (int i = 0; i < n; i++) a[i] = i + 1;
    solve(0, n);
    if (k > 0)
      cout << -1;
    else {
      for (int i = 0; i < n; i++) cout << a[i] << " ";
    }
  }
  return 0;
}
