#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define MAX_MOD 1000000007 #define REP(i,n) for(long long i = 0;i < n;++i) #define LONG_INF 8000000000000000000 int main(){ long long n, k; cin >> n >> k; vector ans; ans.push_back(0); for (int i = 1;i < n-k;++i) { if (i % 2 == 0) { ans.push_back(i); }else{ ans.push_back(i + 2); } } for (int i = n - k;i < n;++i) { ans.push_back(ans[n - k-1]); } if (ans.size() > n) { cout << -1 << endl; return 0; } REP(i, ans.size()) { cout << ans[i] << " "; } cout << endl; return 0; }