  #include <iostream>
#include <string>
using namespace std;
int main(){
	string str;
	int i,j;
	cin >> str;
	string st="";
	for( i=str.size()-1; i>=0 ; i-- )
		st+=str[i] ;
	cout << st << endl;
}
#include<iostream>
#include<string>
#include<algorithm>
#include<iterator>

int main(){
	std::string str;

	std::cin >> str;

	std::reverse_copy(str.begin(), str.end(),
		std::ostream_iterator<char>(std::cout,""));
  	std::cout << std::endl;
  	return 0;
}