//solution, using primes
//should work for large N

#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <cmath>

using namespace std;

bool isPrime(int num)
{
	for(int i = 2; i <= (int)sqrt(num); i++)
		if (num % i == 0) 
			return false;
	return true;
}

int main()
{
	freopen("necklace.in", "r", stdin);
	freopen("necklace.out", "w", stdout);
	int n;
	cin >> n;
	if (n <= 5)
	{
		cout << -1 << endl;
		return 0;
	}
	
	if (n == 7){
		cout << "1 0 1 0 0 1 1 ";
		return 0;
	}
	
	cout << (n % 2) << " ";
	for(int i = 2; i <= n ; i++)
	  	if (isPrime(i))
	    	cout << "1 ";
	  	else
	  		cout <<"0 ";
	cout << endl;
}
