#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  if (n == k) {
    cout << -1 << endl;
    return 0;
  }
  if (k == 0) {
    cout << n;
    if (n != 1) cout << " ";
    for (int i = 1; i <= n - 1; i++) {
      cout << i;
      if (i != n - 1) cout << " ";
    }
    cout << endl;
    return 0;
  }
  vector<int> a(n);
  for (int i = 0; i < n; i++) a[i] = i + 1;
  for (int i = k + 1; i < n; i++) {
    if (i == n - 1) {
      swap(a[i], a[0]);
    } else
      swap(a[i], a[i + 1]);
  }
  for (int i = 0; i < n; i++) {
    cout << a[i];
    if (i != n - 1) cout << " ";
  }
  cout << endl;
  return 0;
}
