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