#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int INF = 1000000000;
int adj[100005];
int vis[100005];
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> v;
  if (n == m) {
    printf("-1");
  } else if (n == 1 && m == 0) {
    cout << "1\n";
  } else if (n == 2 && m == 1) {
    cout << "1 2\n";
  } else {
    int p = n;
    for (int i = 1; i <= m; i++) {
      v.push_back(p);
      p--;
    }
    int x = p;
    p--;
    for (int i = v.size() + 1; i <= n; i++) {
      if (i == n) {
        v.push_back(x);
      } else {
        v.push_back(p);
        p--;
      }
    }
    reverse(v.begin(), v.end());
    for (auto x : v) {
      cout << x << " ";
    }
  }
  return 0;
}
