#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n, k; cin >> n >> k; vector ans(n); for(int i = 1; i < n; i += 2){ if(i & 2) ans[i] = 1; else ans[i] = 2; } for(int i = 0; i < n; i += 2){ if(i & 2) ans[i] = 3; else ans[i] = 4; } if(k < n) ans[k - 1] = ans[k]; else ans[k - 1] = 0; for(int i = k - 2; i >= 0; i--){ ans[i] = ans[i + 1]; } for(int i = 0; i < n; i++){ cout << ans[i] << (i + 1 == n ? '\n' : ' '); } }