#include <bits/stdc++.h>
const long long INF = 1 << 28;
using namespace std;
long long POWER(long long base, long long expo) {
  long long num = 1;
  long long i = expo;
  while (i) {
    num = num * base;
    i--;
  }
  return num;
}
int main() {
  long long t = 1;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    if (k == n)
      cout << -1;
    else if (k == n - 1) {
      for (long long i = 1; i <= n; i++) cout << i << " ";
    } else {
      long long a[n];
      for (long long i = n; i >= n - k + 1; i--) a[i] = i;
      if ((n - k) % 2 == 0) {
        for (long long i = 1; i <= n - k; i += 2) {
          a[i] = i + 1;
          a[i + 1] = i;
        }
      } else {
        for (long long i = 1; i < n - k; i += 2) {
          a[i] = i + 1;
          a[i + 1] = i;
        }
        a[1] = n - k;
        a[n - k] = 2;
      }
      for (long long i = 1; i <= n; i++) cout << a[i] << " ";
    }
  }
  return 0;
}
