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