#include <bits/stdc++.h>
using namespace std;
long long n, k;
long long a[1000011];
long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
void writern(long long x) { write(x), putchar(' '); }
void writeln(long long x) { write(x), puts(""); }
int main() {
  n = read(), k = read();
  for (int i = 0; i < n; i++) a[i] = i + 1;
  if (k % 2 == 0) {
    writeln(-1);
    return 0;
  }
  queue<long long> l, r;
  l.push(0), r.push(n);
  k--;
  while (!l.empty() && k) {
    long long ll = l.front(), rr = r.front();
    l.pop(), r.pop();
    long long mid = ll + rr >> 1;
    if (ll + 1 != rr) {
      l.push(ll);
      l.push(mid);
      r.push(mid), r.push(rr);
      k -= 2;
      swap(a[mid], a[mid - 1]);
    }
  }
  if (k) {
    puts("-1");
    return 0;
  }
  for (int i = 0; i < n - 1; i++) writern(a[i]);
  writeln(a[n - 1]);
  return 0;
}
