#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("unroll-loops")
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  long long ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
template <class T>
inline T lcm(T a, T b) {
  a = abs(a);
  b = abs(b);
  return (a / gcd(a, b)) * b;
}
template <class T, class X>
inline bool getbit(T a, X i) {
  T t = 1;
  return ((a & (t << i)) > 0);
}
template <class T, class X>
inline T setbit(T a, X i) {
  T t = 1;
  return (a | (t << i));
}
template <class T, class X>
inline T resetbit(T a, X i) {
  T t = 1;
  return (a & (~(t << i)));
}
inline long long getnum() {
  char c = getchar();
  long long num, sign = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') sign = -1;
  for (num = 0; c >= '0' && c <= '9';) {
    c -= '0';
    num = num * 10 + c;
    c = getchar();
  }
  return num * sign;
}
inline long long power(long long a, long long b) {
  long long multiply = 1;
  for (int i = (0); i < (b); i++) {
    multiply *= a;
  }
  return multiply;
}
vector<int> justDoIt(vector<int> curr, int val) {
  if (val == 1) return curr;
  if (val == 3) {
    if (curr.size() == 2)
      swap(curr[0], curr[1]);
    else {
      int x = curr.back();
      curr.pop_back();
      curr.insert(curr.begin() + curr.size() / 2 - (curr.size() % 2 == 0), 1,
                  x);
      return curr;
    }
  }
  val--;
  int lvalue = val / 2;
  if (lvalue % 2 == 0) lvalue--;
  vector<int> l, r, ret;
  int mid = curr.size() / 2;
  for (int j = (0); j < (mid); j++) l.push_back(curr[j]);
  for (int j = (mid); j < (curr.size()); j++) r.push_back(curr[j]);
  vector<int> vLeft = justDoIt(l, lvalue);
  vector<int> vRight = justDoIt(r, val - lvalue);
  for (int x : vLeft) ret.push_back(x);
  for (int x : vRight) ret.push_back(x);
  return ret;
}
int main() {
  int test, cases = 1;
  int n, k;
  cin >> n >> k;
  if (k % 2 == 0 || k > 2 * n) {
    cout << -1 << "\n";
    return 0;
  }
  vector<int> in(n);
  for (int i = (0); i < (n); i++) in[i] = i + 1;
  vector<int> out = justDoIt(in, k);
  for (int J = (0); J < (out.size()); J++) cout << out[J] << " ";
  cout << "\n";
  return 0;
}
