#include <bits/stdc++.h>
using namespace std;
const long long OO = 1e8;
const double EPS = (1e-7);
int dcmp(double x, double y) { return fabs(x - y) <= EPS ? 0 : x < y ? -1 : 1; }
const int N = 100;
int main() {
  ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  if (k >= n) {
    cout << -1 << endl;
    return 0;
  }
  if (k == n - 1) {
    for (int i = 0; i < (int)(n); ++i) {
      if (i != 0) cout << ' ';
      cout << i + 1;
    }
    return 0;
  }
  cout << n;
  for (int i = 0; i < (int)(k); ++i) {
    cout << ' ' << i + 2;
  }
  cout << ' ' << 1;
  for (int i = (k + 2); i < (int)(n); ++i) {
    cout << ' ' << i;
  }
  return 0;
}
