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