#include <bits/stdc++.h>
using namespace std;
int n, k, ans[1000 * 100 + 100];
void solve(int s, int e) {
  if (k < 0) {
    cout << "-1\n";
    exit(0);
  }
  if (k == 0 || e - s <= 1) return;
  int mid = (s + e) / 2;
  k -= 2;
  int c = ans[mid];
  ans[mid] = ans[mid - 1];
  ans[mid - 1] = c;
  solve(s, mid);
  solve(mid, e);
}
int main() {
  cin >> n >> k;
  k--;
  for (int i = 0; i < n; i++) ans[i] = i;
  solve(0, n);
  if (k != 0)
    cout << "-1\n";
  else
    for (int i = 0; i < n; i++) cout << ans[i] + 1 << ' ';
  return 0;
}
