#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  if (n == k) {
    cout << -1;
    return 0;
  }
  int q = n - k;
  int a[n];
  for (int i = 0; i < n; i++) a[i] = i + 1;
  if (!(q % 2)) {
    swap(a[0], a[n - 1]);
    q--;
  }
  for (int i = 1; i < q; i += 2) {
    swap(a[i], a[i + 1]);
  }
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  return 0;
}
