# At N=2, [3, 1] # At N=3, [3, 3, 1] # At N=4, [3, 3, 3, 1] # At N=5, [3, 1, 1, 1, 1] # At N=6, [3, 3, 1, 1, 1, 1] # At N=7, [3, 3, 3, 1, 1, 1, 1] N = int(input()) if N%3 == 0: A = [3]*2 + [1]*(N-2) elif N%3 == 1: A = [3]*3 + [1]*(N-3) elif N%3 == 2: A = [3]*1 + [1]*(N-1) print(*A)