#include using namespace std; #define rep(i,x,y) for(int i=(x);i<(y);++i) #define debug(x) #x << "=" << (x) #ifdef DEBUG #define _GLIBCXX_DEBUG #define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl #else #define print(x) #endif const int inf=1e9; const int64_t inf64=1e18; const double eps=1e-9; template ostream &operator<<(ostream &os, const vector &vec){ os << "["; for (const auto &v : vec) { os << v << ","; } os << "]"; return os; } void solve(){ int n,k,l; cin >> n >> k; l=n-k-2; vector a(n),b(n); rep(i,1,n){ if(b[i-1]==1){ a[i]=min(a[i-1],a[i-2])-1; if(l>0){ b[i]=-1; --l; } } if(b[i-1]==-1){ a[i]=max(a[i-1],a[i-2])+1; if(l>0){ b[i]=1; --l; } } if(b[i-1]==0){ if(l>0){ a[i]=a[i-1]+1; b[i]=1; --l; }else a[i]=a[i-1]; } } int mi=*min_element(a.begin(),a.end()); rep(i,0,n) a[i]-=mi; if(l!=0) cout << -1 << endl; else{ cout << a[0]; rep(i,1,n) cout << " " << a[i]; cout << endl; } } int main(){ std::cin.tie(0); std::ios::sync_with_stdio(false); cout.setf(ios::fixed); cout.precision(10); solve(); return 0; }