N, K = map(int, input().split()) ans = [] for i in range(N): if i % K == 0: ans.append(1) else: ans.append(2) print(*ans)