#include <bits/stdc++.h>
using namespace std;
bool sortpairs(const pair<long long int, long long int> a,
               const pair<long long int, long long int> b) {
  if (a.first == b.first) return a.second < b.second;
  return a.first < b.first;
}
void solve() {
  long long int a = 1, b = 0, c = 0, t = 0, k = -1, c1 = 0, c2 = 0, c3, c4,
                n = 0, m = 0, x = 2231131199;
  cin >> a >> b;
  if (a == b) {
    cout << -1;
    return;
  }
  std::vector<long long int> v(a);
  for (int i = 1; i < a + 1; ++i) {
    v[i - 1] = i;
  }
  for (int i = b + 1; i < a - 1; i += 2) {
    swap(v[i], v[i + 1]);
  }
  if (b != a - 1) swap(v[0], v[a - 1]);
  for (auto i : v) cout << i << " ";
  ;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  clock_t z = clock();
  long long int qc = 1;
  for (long long int i = 1; i <= qc; i++) solve();
  fprintf(stderr, "Total Time: % .4Lf\n",
          (long double)(clock() - z) / CLOCKS_PER_SEC),
      fflush(stderr);
}
