#include <bits/stdc++.h>
using namespace std;
long long abs(long long a, long long b) {
  if (a > b)
    return a - b;
  else
    return b - a;
}
long long twopow(long long x) {
  long long p = 1;
  for (long long i = 1; i < x + 1; i++) {
    p = p * 2;
    p = p % 1000003;
  }
  return p;
}
long long t = 0;
void num9(long long x) {
  while (x % 10 == 9) {
    x = x / 10;
    t++;
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long TESTS = 1;
  while (TESTS--) {
    long long n, k;
    cin >> n >> k;
    long long b[n], a[n];
    for (long long i = 0; i < n; i++) b[i] = i + 1;
    if (k == n)
      cout << "-1"
           << "\n";
    else {
      for (long long i = 0; i < n; i++) {
        if (i < n - k)
          a[i] = b[(i + 1) % (n - k)];
        else
          a[i] = b[i];
        cout << a[i] << " ";
      }
    }
  }
  return 0;
}
