#include <bits/stdc++.h>
using namespace std;
int N, K;
int A[100005];
int main() {
  cin >> N >> K;
  if (K >= N) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = N - 1; i >= (N - K); i--) {
    A[i] = i + 1;
  }
  for (int i = 0; i < (N - K) - 1; i++) {
    A[i] = i + 2;
  }
  A[(N - K) - 1] = 1;
  for (int i = 0; i < N - 1; i++) cout << A[i] << " ";
  cout << A[N - 1] << endl;
  return 0;
}
