#include <bits/stdc++.h>
using namespace std;
const long long N = 1000005;
const long long mod = 1e9 + 7;
long long n, c, k;
long long a[N];
void mergesort(long long l, long long r) {
  if (l + 1 == r) return;
  if (!k) {
    sort(a + l, a + r);
    return;
  }
  long long mid = (l + r) / 2;
  k -= 2;
  mergesort(l, mid);
  mergesort(mid, r);
}
void solve() {
  long long x = 0, y = 0, ans = 0;
  long long m;
  cin >> n >> k;
  for (long long i = 0; i < n; ++i) {
    a[i] = n - i - 1;
  }
  if (k % 2 == 0) {
    cout << -1 << "\n";
    return;
    ;
  }
  k--;
  mergesort(0, n);
  if (k > 0) {
    cout << -1 << "\n";
    return;
    ;
  }
  for (long long i = 0; i < n; ++i) {
    cout << a[i] + 1 << " ";
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
