#include <bits/stdc++.h>
using namespace std;
const long long N = 400010;
inline long long read() {
  long long s = 0, w = 1;
  register char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    s = (s << 3) + (s << 1) + (ch ^ 48), ch = getchar();
  return s * w;
}
void print(long long x) {
  if (x < 0) x = -x, putchar('-');
  if (x > 9) print(x / 10);
  putchar(x % 10 + '0');
}
long long n, k;
long long a[N];
void MS(long long l, long long r) {
  if (!k || r - l <= 1) return;
  long long mid = (l + r >> 1);
  k -= 2, swap(a[mid - 1], a[mid]);
  MS(l, mid), MS(mid, r);
}
signed main() {
  n = read(), k = read();
  for (register long long i = 0; i < n; i++) a[i] = i;
  if (!(k & 1ll)) {
    puts("-1");
    return 0;
  }
  if (k == 1) {
    for (register long long i = 1; i <= n; i++) printf("%lld ", i);
    puts("");
    return 0;
  }
  k--;
  MS(0, n);
  if (!k) {
    for (register long long i = 0; i < n; i++) printf("%lld ", a[i] + 1);
    puts("");
  } else
    puts("-1");
  return 0;
}
