#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
const int MOD = 1e9 + 7;
int n, k;
void solve() {
  cin >> n >> k;
  if (n == k) {
    cout << "-1";
  } else {
    cout << n - k << " ";
    for (int i = 1; i < n - k; i++) cout << i << " ";
    for (int i = n - k + 1; i <= n; i++) cout << i << " ";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
