#include <bits/stdc++.h>
using namespace std;
int n, k, sum = 1;
int main() {
  scanf("%d %d", &n, &k);
  vector<int> v(n);
  for (int i = 0; i < n; i++) v[i] = i + 1;
  for (int i = 1; i < n - k; i++) {
    swap(v[i], v[i - 1]);
    sum++;
  }
  if (n - sum != k) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) printf("%d ", v[i]);
  printf("\n");
  return 0;
}
