#include <bits/stdc++.h>
using namespace std;
int n, k;
int main() {
  scanf("%d%d", &n, &k);
  if (n == k) {
    cout << "-1" << endl;
    return 0;
  }
  for (int i = 1; i < n - k; ++i) cout << i + 1 << " ";
  cout << 1 << " ";
  for (int i = n - k + 1; i <= n; ++i) cout << i << " ";
  return 0;
}
