#include <bits/stdc++.h>
using namespace std;
int N, K;
int p[100001];
int main() {
  cin >> N >> K;
  if (N == K) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i <= N; ++i) {
    p[i] = i;
  }
  int a = N - 1;
  while (a - 2 >= K) {
    int temp = p[a + 1];
    p[a + 1] = p[a];
    p[a] = temp;
    a -= 2;
  }
  if (a - 1 == K) {
    p[a + 1] = 1;
    p[1] = a + 1;
  }
  for (int i = 1; i <= N; ++i) {
    if (i != 1) {
      cout << " ";
    }
    cout << p[i];
  }
  cout << endl;
  return 0;
}
