#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m;
  cin >> n >> m;
  long long k = n - m;
  if (k == 0) {
    cout << "-1" << endl;
    return 0;
  }
  vector<long long> x(n + 1);
  for (int i = 1; i <= n; i++) {
    x[i] = i;
  }
  if (k & 1) {
    k--;
    for (int i = 2; i < n; i += 2) {
      if (k) {
        swap(x[i], x[i + 1]);
        k -= 2;
      }
    }
  } else {
    for (int i = 1; i < n; i += 2) {
      if (k) {
        swap(x[i], x[i + 1]);
        k -= 2;
      }
    }
  }
  if (k) {
    cout << "-1" << endl;
    return 0;
  }
  for (int i = 01; i <= n; i++) {
    cout << x[i] << " ";
  }
  cout << endl;
  return 0;
}
