#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int mod = 1e7 + 7;
istream &in(cin);
ostream &out(cout);
long long minn = INT_MAX;
int main() {
  long long n, m;
  cin >> n >> m;
  vector<long long> v;
  if (n - m == 0) {
    return cout << -1, 0;
  }
  v.push_back(1);
  long long c = 0, q;
  for (int i = 1; i < n; i++, m--) {
    if (m > 0)
      v.push_back(i + 1);
    else {
      c++;
      if (c == 1) {
        q = i + 1;
      }
      v.push_back(i + 2);
    }
  }
  if (v[v.size() - 1] > n) {
    v[v.size() - 1] = 1;
    v[0] = q;
  }
  for (auto i : v) cout << i << " ";
  return 0;
}
