#include <bits/stdc++.h>
using namespace std;
template <class T>
T min(T a, T b, T c) {
  return min(a, min(b, c));
}
template <class T>
T min(T a, T b, T c, T d) {
  return min(a, min(b, min(c, d)));
}
template <class T>
T max(T a, T b, T c) {
  return max(a, max(b, c));
}
template <class T>
T max(T a, T b, T c, T d) {
  return max(a, max(b, max(c, d)));
}
bool cmp(const int& a, const int& b) { return a > b; }
int f[300007], _f[300007];
int a[300007];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  if (n == k) {
    puts("-1");
    return 0;
  }
  k = n - k;
  if (k % 2) {
    printf("1 ");
    for (int i = (2); i <= (k); i += 2) {
      printf("%d %d ", i + 1, i);
    }
    for (int i = (k + 1); i <= (n); ++i) printf("%d ", i);
  } else {
    for (int i = (1); i <= (k); i += 2) {
      printf("%d %d ", i + 1, i);
    }
    for (int i = (k + 1); i <= (n); ++i) printf("%d ", i);
  }
  return 0;
}
