#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
class Triplet {
 public:
  long long x;
  long long y;
  long long gcd;
};
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
Triplet extendedEuclid(long long a, long long b) {
  if (b == 0) {
    Triplet ans;
    ans.gcd = a;
    ans.x = 1;
    ans.y = 0;
    return ans;
  }
  Triplet smallAns = extendedEuclid(b, a % b);
  Triplet ans;
  ans.gcd = smallAns.gcd;
  ans.x = smallAns.y;
  ans.y = smallAns.x - (a / b) * smallAns.y;
  return ans;
}
long long modulo(long long a, long long m) {
  Triplet ans = extendedEuclid(a, m);
  return ans.x;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, k;
  cin >> n >> k;
  if (n == k) {
    cout << "-1";
    return 0;
  }
  if (k == n - 1) {
    for (long long i = 1; i <= n; i++) cout << i << " ";
    return 0;
  }
  cout << n - k << ' ';
  for (long long i = 1; i < n - k; i++) cout << i << " ";
  for (long long i = n - k + 1; i <= n; i++) cout << i << " ";
  return 0;
}
