//0006 Reverse Sequence
//^¦çê½¶ñð½]µ½àÌðoÍµÈ³¢
//È¨AüÍ³êé¶ñÍ20¶ÈºÆ·é

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;

int main(void)
{
	string str;
	while( cin >> str)
	{
		reverse(str.begin(), str.end());
		cout << str << endl;
	}
}