#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main( void )
{
  string in;
  while( cin >> in )
  {
     reverse(in.begin(), in.end())'
     cout << in << endl;
  }
  return 0;
}