N = int(input()) result = ["1"] * (N - 2) result.append("3") result.append(["1", "3", "2"][(N - 2) % 3]) print(" ".join(result))