#include<bits/stdc++.h>
using namespace std;
void cpp1(int cnt,string f){
	if(cnt==0){
	cout<<"cout<<\""<<f<<"\"<<endl;"<<endl;return ;}
	cnt--;
	cout << "cout<<\"";
	cpp1(cnt,f);
	cout<<"\"<<endl;" << endl;


}
void cpp(int cnt,string f){
	if(cnt==0){
	cout<<"cout<<\""<<f<<"\"<<endl;"<<endl;return ;}
	cnt--;
cpp1(cnt,"#include <iostream>");
cpp1(cnt,"using namespace std;");
cpp1(cnt,"int main() {");
cpp1(cnt,"return 0; }");

} 
int main(){
	int a;string b;
	cin>>a>>b;
	if(a==1||a==2){
	cout<<b;exit(0);}

		cout << "#include <iostream>" << endl;
cout << "using namespace std; "<< endl;
cout << "int main() {";
cpp(a-2,b);
cout<<"return 0; }" << endl;
	return 0;
}