n = int(input()) r = n%3 if r == 0: one = n-2 elif r == 1: one = n-3 else: one = n-1 for i in range(one): print(1, end=" ") for i in range(n-one): print(3, end=" ") print()