#include <bits/stdc++.h>
using namespace std;
int i, n, k, k1, a[100015];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k;
  for (i = 1; i <= n; ++i) {
    a[i] = i;
  }
  if (n == k) {
    cout << "-1";
  } else {
    k = n - k;
    if (k % 2 == 0) {
      a[1] = n;
      a[n] = 1;
      --k;
    }
    k1 = (k - 1) / 2;
    for (i = 0; i < k1; ++i) {
      swap(a[i * 2 + 2], a[i * 2 + 3]);
    }
    for (i = 1; i <= n; ++i) {
      cout << a[i] << " ";
    }
  }
  return 0;
}
