#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int ans[N];
int main() {
  int n, k;
  cin >> n >> k;
  if (k == n) {
    cout << -1;
    return 0;
  }
  for (int i = n - k + 1; i <= n; i++) ans[i] = i;
  for (int i = 1; i < n - k; i++) ans[i] = i + 1;
  ans[n - k] = 1;
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
