#include<iostream>
#include<stack>
using namespace std;
int main()
{
    string str;
    while(getline(cin,str))
    {
        string res;
        int i=str.length()-1;
        while(i>=0)
        {
            res.push_back(str[i--]);
        }
        cout<<res<<endl;
    }
    return 0;
}