#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  long long a = m, b = n, arr[n + 5], f = 0;
  if (n == m) return cout << -1, 0;
  cout << n - m << " ";
  for (int i = 1; i < n - m; i++) cout << i << " ";
  for (int i = n - m + 1; i <= n; i++) cout << i << " ";
  cout << '\n';
  return 0;
}
