#include <bits/stdc++.h>
using namespace std;
int main() {
  long n = 0, k = 0, i = 0, o = -1, e = -1, j = 0, r = 0;
  cin >> n >> k;
  if (k > (n - 1)) {
    cout << "-1";
    return 0;
  }
  long a[n + 1];
  a[1] = 1;
  long odd[n + 1];
  long even[n + 1];
  o = 0;
  odd[o] = 1;
  for (i = 2; i <= n; i++) {
    if (k > 0) {
      a[i] = i;
      k--;
    } else {
      a[i] = -1;
      if (i % 2 == 0) {
        e++;
        even[e] = i;
      } else {
        o++;
        odd[o] = i;
      }
    }
  }
  for (j = o, r = e; j >= 0 && r >= 0; r--, j--) {
    a[odd[j]] = even[r];
    a[even[r]] = odd[j];
    e--;
    o--;
  }
  for (i = 0; i <= o - 1; i++) {
    long temp = odd[i];
    a[odd[i]] = odd[i + 1];
    a[odd[i + 1]] = temp;
  }
  for (i = 0; i <= e - 1; i++) {
    long temp2 = even[i];
    a[even[i]] = even[i + 1];
    a[even[i + 1]] = temp2;
  }
  for (i = 1; i <= n; i++) cout << a[i] << " ";
  return 0;
}
