#include <iostream>
#include <string>

int main()
{
  using namespace std;

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

  return 0;
}