#include <bits/stdc++.h>
using namespace std;
int dr[] = {1, 0, -1, 0, -1, -1, 1, 1};
int dc[] = {0, -1, 0, 1, -1, 1, -1, 1};
int arr[1000005];
int dp[1000005];
int dis[100000];
int dp2[1000005];
int ex[1000005];
int vis[1000000];
int n;
long long int num;
map<int, int> mp;
int gcd(int a, int b) { return (b == 0 ? a : gcd(b, a % b)); }
int main() {
  int m;
  long long int q = 1, w, e, r, t, y;
  num = 1;
  cin >> n >> m;
  int ok = n;
  if (n == m)
    cout << -1;
  else {
    arr[1] = n;
    for (int i = 2; i <= n; i++) {
      arr[i] = i - 1;
    }
    for (int i = 1; i <= m / 2 && i * 2 + 1 <= n - 1; i++) {
      swap(arr[i * 2 + 1], arr[i * 2 + 2]);
    }
    if (m % 2 && n % 2)
      swap(arr[1], arr[n]);
    else if (m % 2)
      swap(arr[1], arr[2]);
    if (n % 2 && m + 1 == n && n > 1)
      swap(arr[1], arr[n]), swap(arr[1], arr[2]);
    for (int i = 1; i <= n; i++) {
      cout << arr[i] << " ";
    }
  }
}
