#include <iostream>
#include <string>

int main()
{
	std::string input;
	char ch;
	while (std::cin.get(ch)) {
		input.push_back(ch);
	}
	for (std::string::const_reverse_iterator i = input.rbegin(); i != input.rend(); ++i) {
		std::cout << *i;
	}

	return 0;
}