#include <iostream>
#include <cstdlib>

using namespace std;

int main() 
{
	int T;
	cin>>T;
	if (T==1)cout<<1<<endl;
	else if (T==2) cout<<1<<endl<<1<<endl;
	else if (T==3) cout<<1<<endl<<0<<endl<<1<<endl;
	else if (T==4) cout<<1<<endl<<0<<endl<<1<<endl<<1<<endl;
	else if (T==5) cout<<1<<endl<<0<<endl<<1<<endl<<0<<endl<<1<<endl;
	system ("PAUSE>>null");
	return 0;
}