#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int main(int argc, char** argv) {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, k, cnt = 0;
  bool f = 1;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    v.push_back(i);
  }
  if (n == k)
    cout << -1 << endl;
  else {
    int i = 1;
    for (int j = 1; j < n - k; j++) {
      swap(v[i - 1], v[i]);
      i++;
    }
    for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  }
  return 0;
}
