#include <iostream>
#include <string>

int main()
{
  std::string str;
  while (std::cin >> str) {
    for (size_t  i = str.size() - 1; i != 0; --i) {
      std::cout << str[i];
    }
    std::cout << std::endl;
  }

  return 0;
}