#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n , k;
	cin >> n >> k;
	string t = "" , a = "";
	while (k)
	{
		t += (char)(k % 10 + '0');
	}
	for (int i = t.size() - 1; i >= 0; i--)
	{
		a += t[i];
	}
	if (n == 1)
	{
		cout << k;
		return 0;
	}
	else if (n == 2)
	{
		cout << "#include <iostream>" << endl;
		cout << "using namespace std;" << endl;
		cout << "int main() {" << endl;
		cout << "	cout << ";
		for (int i = 0; i < a.size(); i++)
		{
			if (a[i] == '1')
			{
				cout << "1";
			}
			if (a[i] == '2')
			{
				cout << "2";
			}
			if (a[i] == '3')
			{
				cout << "3";
			}
			if (a[i] == '4')
			{
				cout << "4";
			}
			if (a[i] == '5')
			{
				cout << "5";
			}
			if (a[i] == '6')
			{
				cout << "6";
			}
			if (a[i] == '7')
			{
				cout << "7";
			}
			if (a[i] == '8')
			{
				cout << "8";
			}
			if (a[i] == '9')
			{
				cout << "9";
			}
			if (a[i] == '0')
			{
				cout << "0";
			}
		}
		cout << " << endl;" << endl;
		cout << "	return 0;" << endl;
		cout << "}" << endl;
	}
	else if (n == 3)
	{
		cout << "#include <iostream>" << endl;
		cout << "using namespace std;" << endl;
		cout << "int main() {" << endl;
		cout << "	cout << \"#include <iostream>\" << endl" << endl;
		cout << "	cout << \"using namespace std;\" << endl;" << endl;
		cout << "	cout << \"int main() { cout << ";
		for (int i = 0; i < a.size(); i++)
		{
			if (a[i] == '1')
			{
				cout << "1";
			}
			if (a[i] == '2')
			{
				cout << "2";
			}
			if (a[i] == '3')
			{
				cout << "3";
			}
			if (a[i] == '4')
			{
				cout << "4";
			}
			if (a[i] == '5')
			{
				cout << "5";
			}
			if (a[i] == '6')
			{
				cout << "6";
			}
			if (a[i] == '7')
			{
				cout << "7";
			}
			if (a[i] == '8')
			{
				cout << "8";
			}
			if (a[i] == '9')
			{
				cout << "9";
			}
			if (a[i] == '0')
			{
				cout << "0";
			}
		}
		cout << " << endl; return 0; }\" << endl;" << endl;
		cout << "	return 0;" << endl;
		cout << "}" << endl;
	}
	return 0;
}