In Berland prime numbers are fashionable — the respectable citizens dwell only on the floors with numbers that are prime numbers. The numismatists value particularly high the coins with prime nominal values. All the prime days are announced holidays!

Yet even this is not enough to make the Berland people happy. On the main street of the capital stand n houses, numbered from 1 to n. The government decided to paint every house a color so that the sum of the numbers of the houses painted every color is a prime number.

However it turned out that not all the citizens approve of this decision — many of them protest because they don't want many colored houses on the capital's main street. That's why it is decided to use the minimal possible number of colors. The houses don't have to be painted consecutively, but every one of n houses should be painted some color. The one-colored houses should not stand consecutively, any way of painting is acceptable.

There are no more than 5 hours left before the start of painting, help the government find the way when the sum of house numbers for every color is a prime number and the number of used colors is minimal. 

Input

The single input line contains an integer n (2 ≤ n ≤ 6000) — the number of houses on the main streets of the capital.

Output

Print the sequence of n numbers, where the i-th number stands for the number of color for house number i. Number the colors consecutively starting from 1. Any painting order is allowed. If there are several solutions to that problem, print any of them. If there's no such way of painting print the single number -1.

Examples

Input

8

Output

1 2 2 1 1 1 1 2
import java.util.*;

public class cf45g {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		boolean[] isPrime = new boolean[n+1];
		Arrays.fill(isPrime,true);
		int[] ans = new int[n+1];
		Arrays.fill(ans,1);

		int sum = (n*n+n)/2;
		if(!isPrime(sum)) {
			//every even number is the sum of two odd primes
			if(sum%2==0) {
				int crnt = 3;
				while(!(isPrime(crnt)&&isPrime(sum-crnt))) crnt++;
				ans[crnt] = 2;
			}
			//every odd number is the sum of 2 and a prime or 3 and 2 primes
			else {
				if(isPrime(sum-2)) {
					ans[2] = 2;
				}
				else {
					ans[3] = 2;
					int crnt = 3;
					while(!(isPrime(crnt)&&isPrime(sum-3-crnt))) crnt++;
					ans[crnt] = 3;
				}
			}
		}

		for(int i=1; i<=n; i++)
			System.out.print(ans[i] + " ");
		System.out.println();
	}
	static boolean isPrime(int x) {
		if(x==2) return true;
		if(x<2||x%2==0) return false;
		for(int i=3; i*i<=x; i+=2)
			if(x%i==0)
				return false;
		return true;
	}
}
