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