#include <bits/stdc++.h>
using namespace std;
int a[100005];
int main() {
  int n, k, p, current = 2;
  cin >> n >> k;
  p = n - 1;
  if (k == n) {
    cout << -1;
    return 0;
  } else if (k == n - 1) {
    for (int i = 1; i <= n; ++i) {
      cout << i << ' ';
    }
    return 0;
  } else if (k == 0) {
    for (int i = 2; i <= n; ++i) {
      cout << i << ' ';
    }
    cout << 1 << ' ';
    return 0;
  }
  for (int i = 1; i <= n; ++i) {
    a[i] = i;
  }
  int v = p - k;
  if (v % 2 == 1) {
    swap(a[1], a[2]);
    p--;
  }
  int i = (p == n - 1) ? 2 : 3;
  for (; i <= n; ++i) {
    if (p == k) {
      for (int j = 1; j <= n; ++j) cout << a[j] << ' ';
      return 0;
    } else {
      swap(a[i], a[i + 1]);
      i++;
      p -= 2;
    }
  }
  cout << -1;
}
