//#include <fstream>
#include <iostream>

using namespace std;
/*ifstream fin("text.in");
ofstream fout("text.out");*/

int n;

void printRev(int);

int main()
{
	cin >> n;
	printRev(1);
	return 0;
}

void printRev(int k)
{
	int aux = 0, x;
	cin >> x;

	if (k < n)
		printRev(k + 1);

	while (x)
	{
		aux = aux * 10 + x % 10;
		x /= 10;
	}
	cout << aux << '\n';
}