#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
//typedef long long ll;
//#define int long long //signed
void solve(){
int n,m;
cin >> n >> m;
if(n-m == 1) cout << -1 << endl;
else{
for(int i = 1; i <= m; i++){
cout << i << " ";
}
int cnt = m;
for(int i = n; i > m; i--){
cnt++;
if(cnt == i) {
cout << i-1 << " " << i << " ";
i--;
cnt = -INT_MAX;
continue;
}
cout << i << " ";
}
cout << endl;
}
}
int main(){
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int t = 1;
//std::cin >> t;
while(t--){
solve();
}
return 0;
}