#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int main() {
  int n, k, f = 0;
  cin >> n >> k;
  if (n == k) {
    cout << "-1";
    return 0;
  }
  v.push_back(1);
  for (int i = 0; i < n - 1; i++) v.push_back(i + 2);
  k = n - k - 1;
  int c = 1;
  while (k > 1) {
    swap(v[c], v[c + 1]);
    c += 2;
    k -= 2;
  }
  if (k != 0) swap(v[0], v[n - 1]);
  for (int i = 0; i < n; i++) cout << v[i] << ' ';
  return 0;
}
