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