#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b);
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n, k;
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; i++) {
    a[i] = i + 1;
  }
  if (n == k) {
    cout << -1 << endl;
    return 0;
  }
  int k_zero = n - k;
  cout << k_zero;
  for (int i = 1; i < k_zero; i++) {
    cout << " " << i;
  }
  for (int i = k_zero + 1; i <= n; i++) {
    cout << " " << i;
  }
  cout << endl;
  return 0;
}
