#include <bits/stdc++.h>
using namespace std;
int n, k, arr[100005];
void srt(int lf, int rt) {
  if (rt - lf < 2 || !k) return;
  k -= 2;
  int mid = (lf + rt) / 2;
  swap(arr[mid - 1], arr[mid]);
  srt(lf, mid);
  srt(mid, rt);
}
int main() {
  cin >> n >> k;
  if (k % 2 == 0) return cout << "-1\n", 0;
  k--;
  for (int i = 0; i < n; i++) arr[i] = i + 1;
  srt(0, n);
  if (k) return cout << "-1\n", 0;
  for (int i = 0; i < n; i++) cout << arr[i] << " ";
  return 0;
}
