#include<iostream>
using namespace std;
int main()
{
	string str;
	while( cin>>str )
		cout<<str[3]<<str[2]<<str[1]<<str[0]<<endl;
}