#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  cin >> n >> m;
  int k = n - m;
  int cnt = 0;
  if (n == m) return cout << -1, 0;
  if (k == 1) {
    cout << "1 ";
    k--;
    cnt = 1;
  } else if (k & 1) {
    cout << "3 1 2 ";
    k -= 3;
    cnt = 3;
  }
  while (k) {
    cout << cnt + 2 << " " << cnt + 1 << " ";
    cnt += 2;
    k -= 2;
  }
  while (cnt < n) {
    cout << cnt + 1 << " ";
    cnt++;
  }
}
