#include <bits/stdc++.h>
using namespace std;
int a[100005];
int main() {
  int i, n, k, j;
  while (scanf("%d%d", &n, &k) != EOF) {
    if (n == k) {
      printf("-1\n");
      continue;
    }
    for (i = 1; i <= n; i++) a[i] = i;
    k = n - 1 - k;
    if (k & 1) {
      swap(a[1], a[n]);
      k--;
    }
    for (i = 1, j = 2; i <= k / 2; i++, j += 2) swap(a[j], a[j + 1]);
    printf("%d", a[1]);
    for (i = 2; i <= n; i++) printf(" %d", a[i]);
    printf("\n");
  }
  return 0;
}
