N = int(input())
ans = [1]*N
ans[0] = 3
ans[1] += 3-sum(ans)%3+1
print(*ans)