import random from functools import reduce from operator import mul N = int(input()) l = [] limit = 312456 def random_list(): for i in range(N): l.append(random.randint(1, (limit - N) -sum(l) -1)) for x in range(limit**N): random_list() if sum(l) % 3 == 1 and reduce(mul, l) % 3 == 0: l = list(map(str, l)) print(' '.join(l)) break else: l = []