#include <bits/stdc++.h>
const int MAXN = 200000;
int elems[MAXN];
void init(int n) {
  for (int i = 1; i <= n; ++i) elems[i] = i;
}
void solve(int tmp, int n) {
  int cnt = 0;
  int tmpe;
  if (tmp & 1) {
    for (int i = 1; i <= n && cnt < tmp; i += 2) {
      tmpe = elems[i];
      elems[i] = elems[i + 1];
      elems[i + 1] = tmpe;
      if (i == 1)
        cnt++;
      else
        cnt += 2;
    }
  } else {
    for (int i = 2; i <= n && cnt < tmp; i += 2) {
      tmpe = elems[i];
      elems[i] = elems[i + 1];
      elems[i + 1] = tmpe;
      cnt += 2;
    }
  }
}
void output(int n, int k) {
  int tmp = n - 1 - k;
  solve(tmp, n);
  for (int i = 1; i <= n; ++i) {
    if (i == 1)
      printf("%d", elems[i]);
    else
      printf(" %d", elems[i]);
  }
  printf("\n");
}
int main() {
  int n, k;
  while (scanf("%d%d", &n, &k) != EOF) {
    init(n);
    if (k > n - 1)
      printf("-1\n");
    else {
      output(n, k);
    }
  }
  return 0;
}
