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