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