INF = 10 ** 9 MOD = 10 **9 + 7 import sys sys.setrecursionlimit(100000000) dy = (-1,0,1,0) dx = (0,1,0,-1) def main(): n = int(input()) ans = [3] t = 3 for _ in range(n - 2): ans.append(1) t += 1 if t%3 == 0: ans.append(1) elif t%3 == 1: ans.append(3) else: ans.append(2) print(' '.join(map(str,ans))) if __name__=='__main__': main()