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