#include <bits/stdc++.h>
using namespace std;
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
const int INF = 1e9 + 23;
const long long INFL = 2e18 + 23;
const int MAX = 1e5 + 3;
int k;
int a[MAX];
void re(int l, int r) {
  if (k == 0) return;
  if (r - l == 1) return;
  int mid = (l + r) / 2;
  k -= 2;
  swap(a[mid - 1], a[mid]);
  re(l, mid);
  re(mid, r);
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n >> k;
  if (k % 2 == 0) {
    cout << "-1";
    return 0;
  }
  k--;
  for (int i = 1; i <= n; i++) a[i] = i;
  re(1, n + 1);
  if (k != 0) {
    cout << "-1";
    return 0;
  }
  for (int i = 1; i <= n; i++) cout << a[i] << " ";
  return 0;
}
