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

int main(){
	string str;
	string::reverse_iterator ri;
	while(cin>>str){
		ri=str.rbegin();
		while(ri!=str.rend()){
			cout<<*ri;
			++ri;
		}
		cout<<endl;
	}
	return 0;
}