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