#include <bits/stdc++.h>
const unsigned long long INF = 2009000999;
const float cp = 2 * acos(0.0);
const float eps = 1e-18;
using namespace std;
int main() {
  unsigned long long n, k, s = 0, r = 0;
  cin >> n >> k;
  if (k == n) {
    cout << -1;
    return 0;
  }
  if (n - k == 1) {
    for (int i = 1; i <= n; i++) cout << i << ' ';
    return 0;
  }
  cout << n << ' ';
  int i = 2;
  while (i <= k + 1) {
    cout << i << ' ';
    i++;
  }
  for (int i = k + 2; i <= n; i++) {
    if (i == k + 2)
      cout << 1 << ' ';
    else
      cout << i - 1 << ' ';
  }
  return 0;
}
