#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, k, flag = 1;
  cin >> n >> k;
  long long a[n];
  for (long long i = 0; i < n; i++) a[i] = i + 1;
  if (n == k)
    cout << "-1";
  else {
    long long diff = n - 1 - k, i, d;
    if (diff % 2 == 1) {
      swap(a[0], a[1]);
      d = --diff;
      i = 2;
    } else {
      d = diff;
      i = 1;
    }
    while (d != 0) {
      if (i >= n) {
        flag = 0;
        break;
      }
      swap(a[i], a[i + 1]);
      i += 2;
      d -= 2;
    }
    if (flag == 0)
      cout << "-1" << endl;
    else {
      for (long long i = 0; i < n; i++) cout << a[i] << " ";
    }
  }
  return 0;
}
