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