#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, k, tempk;
  cin >> n >> k;
  tempk = k;
  if (k >= n)
    cout << -1;
  else if (k == (n - 1)) {
    for (int i = 1; i <= n; i++) cout << i << " ";
  } else {
    int arr[n + 1];
    int even = 2, odd = 3, l = 2;
    while (tempk--) {
      if (l % 2 == 0) {
        arr[l] = even;
        even += 2;
      } else {
        arr[l] = odd;
        odd += 2;
      }
      l++;
    }
    while (l < n) {
      arr[l] = l + 1;
      l++;
    }
    arr[1] = k + 2;
    arr[n] = 1;
    for (int i = 1; i <= n; i++) cout << arr[i] << " ";
  }
  return (0);
}
