#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
int check(vector<int> v) {
  int k = 0;
  for (int i = 0; i < v.size(); ++i) k += (gcd(i + 1, v[i]) > 1);
  return k;
}
int main() {
  int n, k;
  cin >> n >> k;
  if (n == k)
    cout << -1 << endl;
  else {
    vector<int> v(n);
    v[n - k - 1] = 1;
    int p = 2;
    for (int i = 0; i < n; ++i) {
      if (i == n - k - 1) continue;
      v[i] = p++;
    }
    for (int i = 0; i < n; ++i) cout << v[i] << ' ';
  }
  return 0;
}
