#include <bits/stdc++.h>
using namespace std;
int main() {
  int array[100001] = {0};
  int n, k, i, c, t;
  cin >> n >> k;
  if (k >= n)
    cout << -1;
  else {
    array[1] = n - k;
    t = 2;
    c = 1;
    while (c != array[1]) {
      array[t++] = c++;
    }
    for (int i = n - k + 1; i <= n; ++i) {
      array[i] = i;
    }
    for (int i = 1; i <= n; ++i) {
      cout << array[i] << " ";
    }
  }
  return 0;
}
