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

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