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