#include <bits/stdc++.h>
using namespace std;
int n, k, a, b;
int main() {
  scanf("%d%d", &n, &k);
  if (k == n)
    cout << "-1\n";
  else {
    if (k > 0) {
      cout << n - k << " ";
      for (a = 1; a < n - k; a++) cout << a << " ";
      for (a = n - k + 1; a < n; a++) cout << a << " ";
      cout << n << endl;
    } else {
      b = 1;
      cout << n;
      while (b != n) {
        cout << " " << b;
        b = b + 1;
      }
      cout << endl;
    }
  }
  return 0;
}
