#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; i++) {
    a[i] = i + 1;
  }
  int t = n - 1;
  if (abs(t - k) % 2 == 1) {
    swap(a[0], a[1]);
    t--;
  }
  int x = 0;
  if (k > t)
    cout << -1 << endl;
  else if (k == t) {
    for (int i = 0; i < n; i++) {
      cout << a[i] << " ";
    }
  } else {
    int end = n - 2;
    while (t) {
      swap(a[end], a[end + 1]);
      end = end - 2;
      t = t - 2;
      if (t == k) {
        x++;
        break;
      }
    }
    if (x == 0)
      cout << -1 << endl;
    else {
      for (int i = 0; i < n; i++) {
        cout << a[i] << " ";
      }
    }
  }
}
