#include <bits/stdc++.h>
using namespace std;
const int mod = pow(10, 9) + 7;
bool compare(pair<int, int> p1, pair<int, int> p2) {
  return p1.second < p2.first;
}
void open_file() {}
void fast_io() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
}
bool cmp(pair<int, string>& p1, pair<int, string>& p2) {
  return p1.first > p2.first;
}
int cnt = 1, n, k;
vector<int> temp;
bool isSorted(vector<int>& A, int l, int r) {
  for (int i = l + 1; i < r; i++)
    if (A[i] < A[i - 1]) {
      return false;
    }
  return true;
}
void merge(vector<int>& A, int l, int mid, int r) {
  temp.clear();
  int index = l;
  int left = l;
  int right = mid;
  while (left < mid and right < r) {
    if (A[left] > A[right]) {
      temp.push_back(A[right]);
      right++;
    } else {
      temp.push_back(A[left]);
      left++;
    }
  }
  while (left < mid) temp.push_back(A[left++]);
  while (right < r) temp.push_back(A[right++]);
  for (int val : temp) A[index++] = val;
}
void merge_sort(vector<int>& A, int l, int r) {
  if (l == r - 1 or cnt == k) return;
  int mid = (l + r) / 2;
  swap(A[mid], A[mid - 1]);
  cnt += 2;
  merge_sort(A, l, mid);
  if (mid + 1 != r) merge_sort(A, mid, r);
}
void solve() {
  cin >> n >> k;
  if (k & 1) {
    vector<int> A;
    for (int i = 1; i <= n; i++) A.push_back(i);
    merge_sort(A, 0, n);
    if (cnt == k) {
      for (int val : A) cout << val << " ";
      cout << "\n";
    } else
      cout << "-1\n";
  } else
    cout << "-1\n";
}
int main() {
  fast_io();
  solve();
  return 0;
}
