#include <bits/stdc++.h>
using namespace std;
int a[100006];
int n, k;
void printans() {
  cout << a[1];
  for (int i = 2; i <= n; i++) cout << " " << a[i];
  cout << '\n';
  exit(0);
}
void rec(int le, int ri) {
  if (le == ri) return;
  if (!k) printans();
  k--;
  int mid = (le + ri) / 2;
  int t = 0;
  if ((le + ri) % 2 == 0) t = 1;
  reverse(a + le, a + mid + 1);
  reverse(a + mid + 1, a + ri + 1);
  reverse(a + le, a + ri + 1);
  rec(le, mid - t);
  rec(mid + 1 - t, ri);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  if (k % 2 == 0) {
    cout << -1 << '\n';
    return 0;
  }
  k = (k - 1) / 2;
  for (int i = 1; i <= n; i++) a[i] = i;
  rec(1, n);
  if (k)
    cout << -1 << '\n';
  else
    printans();
  return 0;
}
