#include using namespace std; typedef long long ll; int x[4] = { 4, 2, 3, 1 }; int a[100000]; int main() { cin.tie(0); ios::sync_with_stdio(false); int n, k; cin >> n >> k; for(int i = 0; i < n; i++) { a[i] = x[i % 4]; } for(int i = 0; i < k; i++) { if(k % 2 == 0) a[i] = 1000000; else a[i] = 0; } int cnt = 0; for(int i = 0; i <= n - 3; i++) { if(a[i] < a[i + 1] && a[i + 1] > a[i + 2]) cnt++; if(a[i] > a[i + 1] && a[i + 1] < a[i + 2]) cnt++; } assert(cnt == n - k - 2); for(int i = 0; i < n; i++) { cout << a[i]; if(i == n - 1) cout << endl; else cout << " "; } }