import java.util.*; public class Main { static TreeSet primes; public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int mod = (n - 1) % 3; int count = (n - 1) / 3 * 3; if (mod == 0) { count--; } StringBuilder sb = new StringBuilder(); for (int i = 0; i < count; i++) { sb.append(1).append(" "); } if (mod == 0) { sb.append(2).append(" "); } else if (mod == 1) { sb.append(1).append(" "); } else { sb.append(2).append(" ").append(2).append(" "); } sb.append(3); System.out.println(sb); } }