#include <bits/stdc++.h>
using namespace std;
void sol() {
  long long int n, k;
  cin >> n >> k;
  if (n == k)
    cout << -1 << "\n";
  else {
    long long int ar[n];
    for (long long int i = 0; i < k; i++) {
      ar[n - 1 - i] = n - i;
    }
    ar[n - 1 - k] = 1;
    for (long long int i = 2; i <= n - k; i++) cout << i << " ";
    for (long long int i = n - 1 - k; i < n; i++) cout << ar[i] << " ";
  }
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) {
    sol();
  }
  return 0;
}
