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