#include<iostream>
#include<cstdio>
using namespace std;
int Length(string s)
{
int len=0;
for(int i=0;s[i]!='\0';i++)
{
len++;
}
return len;
}
string Reverse(string s)
{
int lens=Length(s);
string res=" ";
for(int i=lens-1;i>=0;i--)
{
res=res+s[i];
}
return res;
}
int main()
{
string s;
cin>>s;
cout<<Reverse(s)<<endl;
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPGNzdGRpbz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKaW50IExlbmd0aChzdHJpbmcgcykKewppbnQgbGVuPTA7CmZvcihpbnQgaT0wO3NbaV0hPSdcMCc7aSsrKQp7CmxlbisrOwp9CnJldHVybiBsZW47Cn0Kc3RyaW5nIFJldmVyc2Uoc3RyaW5nIHMpCnsKaW50IGxlbnM9TGVuZ3RoKHMpOwpzdHJpbmcgcmVzPSIgIjsKZm9yKGludCBpPWxlbnMtMTtpPj0wO2ktLSkKewpyZXM9cmVzK3NbaV07Cn0KcmV0dXJuIHJlczsKfQppbnQgbWFpbigpCnsKc3RyaW5nIHM7CmNpbj4+czsKY291dDw8UmV2ZXJzZShzKTw8ZW5kbDsKcmV0dXJuIDA7Cn0K