#include <bits/stdc++.h>
using namespace std;
long long arr[100050];
int main() {
  cin.tie(0);
  std::ios::sync_with_stdio(false);
  int x, y;
  cin >> x >> y;
  if (y >= x) {
    cout << -1 << endl;
    return 0;
  }
  cout << x - y << " ";
  for (int i = 1; i < x - y; i++) {
    cout << i << " ";
  }
  for (int i = x - y + 1; i <= x; i++) {
    cout << i << " ";
  }
  return 0;
}
