#include<bits/stdc++.h>
using namespace std;
void tw(int n,int m)
{
	if(n==1) cout<<m;
	else 
	{
		cout<<"#include<bits/stdc++.h>\n";
		cout<<"using namespace std;\n";
		cout<<"void tw(int n,m)\n";
		cout<<"    if(a===1) cout<<b;\n";
		cout<<"    else\n";
		cout<<"    {\n";
		cout<<"    tw(n-1,m)\n";
		cout<<"int main()\n";
		cout<<"{\n";
		cout<<"    ios::sync_with_stdio(0);\n";
		cout<<"    cin.tie(0);\n";
		cout<<"    cout.tie(0);";
		cout<<"\n";
		cout<<"    int n,m;\n";
		cout<<"    cin>>n>>m;\n";
		cout<<"    tw(n+1,m);\n";
		cout<<"    reuturn 0;\n";
		cout<<"}";
	}
}
int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	
	int n,m;
	cin>>n>>m;
	tw(n,m);
	return 0;
}