#include <bits/stdc++.h>
using namespace std;
int n, m;
bool f[1000005];
int ans[100005];
int main() {
  int i, j, t, tc = 1, a, b;
  cin >> n >> m;
  if (n == 1 && m != 0 || n == m) {
    printf("-1\n");
    return 0;
  }
  if (m == n - 1) {
    for (i = 1; i <= n; i++) cout << i << " ";
    return 0;
  }
  if (m == 0) {
    cout << n << " ";
    for (i = 2; i <= n; i++) {
      cout << i - 1 << " ";
    }
    return 0;
  }
  int c = 0;
  for (i = n; i >= 2; i--) {
    ans[i] = i - 1;
  }
  for (i = 2; i <= n; i++) {
    if (c == m) break;
    if (c < m) {
      ans[i] = i;
      c++;
    }
  }
  for (i = n; i >= 2; i--)
    if (ans[i] == ans[i - 1]) {
      ans[i] = 1;
      ans[1] = n;
    }
  for (i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
