#include<string>
#include<iostream>
using namespace std;
int main ()
{
     string x,s;
     while(cin>>x)
     {
            for(int i=x.size()-1;i>=0;i--)
            {
                s+=x[i];
            }
      cout<<s;
      }
      return 0;
 }