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