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