#include <bits/stdc++.h>
#pragma GCC optimise("Ofast")
using namespace std;
const int mod = 1e+9 + 7;
long long binomialCoeff(long long n, long long k) {
  long long res = 1;
  if (n < k) return 0;
  if (k > n - k) k = n - k;
  for (long long i = 0; i < k; ++i) {
    res *= (n - i);
    res /= (i + 1);
  }
  return res;
}
void solve() {
  int n, k, a[100005], t;
  cin >> n >> k;
  if (k == n) {
    cout << -1;
    return;
  }
  for (long long i = 0; i < n; i++) {
    a[i] = i + 1;
  }
  for (int i = 2 + k - 1; i < n; i = i + 2) {
    t = a[i];
    a[i] = a[(i + 1) % n];
    a[(i + 1) % n] = t;
  }
  for (long long i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) solve();
}
