#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  if (n == k) {
    cout << -1;
    return 0;
  }
  if (k == n - 1) {
    for (int i = 1; i <= n; i++) {
      cout << i << " ";
    }
  } else {
    cout << k + 2 << " ";
    int count = 0;
    int i;
    for (i = 2; count < k; i++) {
      cout << i << " ";
      count++;
    }
    i++;
    int rem = n - k - 1;
    for (i; rem > 1; rem--) {
      cout << i << " ";
      i++;
    }
    cout << 1 << " ";
  }
  return 0;
}
