#include <iostream>
using namespace std;
int main()
{
int n, k;
cin >> n >> k;
if (k > (n-1)/2) {
cout << "-1" << endl;
return 0;
}
for (int i = 1; i <= k; ++i) {
cout << i*2 << " ";
cout << i*2 - 1 << " ";
}
for (int i = k*2 + 1; i <= n; ++i) {
cout << i << " ";
}
return 0;
}