#include <bits/stdc++.h>
using namespace std;
void swap(int &a, int &b) {
  int temp;
  temp = a;
  a = b;
  b = temp;
}
int main() {
  int n, k;
  cin >> n >> k;
  if (n <= k) {
    cout << -1;
    return 0;
  }
  int per[n + 1];
  for (int i = 0; i <= n; i++) {
    per[i] = i;
  }
  int i;
  for (i = 2; i < n - k; i = i + 2) {
    swap(per[i], per[i + 1]);
  }
  if ((n - k) % 2 == 0) swap(per[1], per[i]);
  for (int i = 1; i <= n; i++) cout << per[i] << " ";
  return 0;
}
