import java.util.Scanner; public class WellKnown { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); int div = N / 3; int remain = N % 3; if (remain == 2) { System.out.print("1 3"); } else if (remain == 1) { System.out.print("1 1 2 3"); div = div - 1; } else { System.out.print("3 3 1"); div = div - 1; } for (int i = 0; i < div; i++) { System.out.print(" 1 1 1"); } } }