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