#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, j, k, l = 1, n, m, d, f, x, y;
  cin >> n >> k;
  if (n == k) return cout << "-1", 0;
  cout << n - k << " ";
  for (i = 1; i <= n; i++) {
    if (i != (n - k)) cout << i << " ";
  }
}
