#include <bits/stdc++.h>
using namespace std;
void swap(long long int ans[], long long int i, long long int j) {
  long long int temp = ans[i];
  ans[i] = ans[j];
  ans[j] = temp;
}
int main(int argc, char const *argv[]) {
  long long int n, k;
  cin >> n >> k;
  long long int ans[100022];
  for (long long int i = 0; i < 100022; i++) ans[i] = i;
  if (n == k) {
    cout << "-1\n";
    return 0;
  } else {
    if (n % 2 == 0) {
      if (k % 2 == 0) {
        for (long long int i = 1; i <= (n - k); i += 2) swap(ans, i, i + 1);
      } else {
        for (long long int i = 2; i <= (n - k); i += 2) swap(ans, i, i + 1);
      }
    } else {
      if (k % 2 == 0) {
        for (long long int i = 2; i <= (n - k); i += 2) swap(ans, i, i + 1);
      } else {
        for (long long int i = 1; i <= (n - k); i += 2) swap(ans, i, i + 1);
      }
    }
  }
  for (long long int i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << "\n";
  return 0;
}
