#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define rep(i, N) for (int i = 0; i < N; i++) #define pb push_back typedef long long ll; typedef unsigned long long ull; typedef pair i_i; typedef pair ll_i; typedef pair d_i; typedef pair ll_ll; typedef pair d_d; struct edge { int u, v; ll w; }; ll MOD = 1000000007; ll _MOD = 1000000009; int INF = INT_MAX / 10; double EPS = 1e-10; int main() { int N, K; cin >> N >> K; vector a(N); rep(i, N) a[i] = i / 2 * 2 + (1 - i % 2); rep(k, K) a[k] = 0; rep(i, N) cout << a[i] << (i + 1 < N ? ' ' : '\n'); }