#include <bits/stdc++.h>
using namespace std;
int siz;
int temp[10000000], temp2[10000000], coun = 1;
void merger(int st, int mid, int ed) {
  int i, j;
  for (i = mid + 1, j = st; i <= ed; i++, j++) temp2[j] = temp[i];
  for (i = st; i <= mid; i++, j++) temp2[j] = temp[i];
  for (i = st; i <= ed; i++) temp[i] = temp2[i];
}
void sorting(int st, int ed, int calls) {
  int mid = (st + ed) / 2;
  if (st == ed) return;
  if (calls > coun) {
    coun += 2;
    sorting(st, mid, calls);
    sorting(mid + 1, ed, calls);
    merger(st, mid, ed);
  }
}
int main() {
  int ed, x, calls;
  cin >> ed >> calls;
  if (calls % 2 == 0 || (ed * 2) <= calls) {
    cout << -1 << endl;
    return 0;
  }
  siz = ed;
  for (int i = 0; i < ed; i++) temp[i] = i + 1;
  sorting(0, ed - 1, calls);
  for (int i = 0; i < siz; i++) cout << temp[i] << " ";
  return 0;
}
