#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  if (k == n) {
    cout << "-1\n";
    return 0;
  }
  vector<int> vec;
  for (int i = n; i > n - k; i--) vec.push_back(i);
  for (int i = n - k; i >= 1; i--) {
    if (i - 1 > 0) vec.push_back(i - 1);
    vec.push_back(i);
    i--;
  }
  for (int i = n - 1; i >= 0; i--) cout << vec[i] << " ";
  cout << endl;
}
