#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  int n, k;
  cin >> n >> k;
  vector<long long> num(n + 1);
  for (int i = 1; i <= n; i++) num[i] = i;
  if (k == n) {
    cout << -1 << endl;
    return 0;
  }
  int bd = n - k;
  if (bd % 2 == 0) swap(num[1], num[2]), bd--;
  bd--;
  for (int i = n; i > 0 && bd > 0; i -= 2, bd -= 2) swap(num[i], num[i - 1]);
  for (int i = 1; i <= n; i++) cout << num[i] << (i == n ? "\n" : " ");
}
