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