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