#include <bits/stdc++.h>
using namespace std;
int n, k;
int a[100009];
void merge_sort(int l, int r) {
  if (l >= r || k < 1) return;
  int m = (l + r) >> 1;
  k -= 2;
  merge_sort(l, m);
  merge_sort(m + 1, r);
  int h[100009];
  int it = l;
  for (int j = m + 1; j <= r; j++) h[it++] = a[j];
  for (int j = l; j <= m; j++) h[it++] = a[j];
  for (int i = l; i <= r; i++) a[i] = h[i];
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) a[i] = i + 1;
  k--;
  merge_sort(0, n - 1);
  if (k) return cout << -1, 0;
  for (int i = 0; i < n; i++) cout << a[i] << ' ';
}
