n, k = map(int, input().split()) a = [1, 3, 2, 4] * n nk = n - k a[nk:] = [a[nk-1]] * (n - nk) print(*a[:n])