#include<fstream>
#include<string.h>
using namespace std;
ifstream f1("DQXAU.INP");
ofstream f2("DQXAU.OUT");
void nghichdao(string x) 
{
	if(x.length()==0) return;
	else
	{
		f2<<x[x.length()-1];
		x.erase(x.length()-1);
		nghichdao(x);
	}
}
int main()
{
	string l;
	int u=0;
	while(u==0)
	{
		getline(f1,l);
		nghichdao(l);
		if(l.length()==0) break;
		else f2<<endl;
	}
	f1.close();
	f2.close();
	return 0;
}
