#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)
{
string res=" ";
int lens=Length(s);
for(int i=lens-1;i>=0;i--)
{
res=res+s[i];
}
return res;
}
int main()
{
string s;
cin>>s;
cout<<Reverse(s);
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPGNzdGRpbz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKaW50IExlbmd0aChzdHJpbmcgcykKewppbnQgbGVuPTA7CmZvcihpbnQgaT0wO3NbaV0hPSdcMCc7aSsrKQp7CmxlbisrOwp9CnJldHVybiBsZW47Cn0Kc3RyaW5nIFJldmVyc2Uoc3RyaW5nIHMpCnsKc3RyaW5nIHJlcz0iICI7CmludCBsZW5zPUxlbmd0aChzKTsKZm9yKGludCBpPWxlbnMtMTtpPj0wO2ktLSkKewpyZXM9cmVzK3NbaV07Cn0KcmV0dXJuIHJlczsKfQppbnQgbWFpbigpCnsKc3RyaW5nIHM7CmNpbj4+czsKY291dDw8UmV2ZXJzZShzKTsKcmV0dXJuIDA7Cn0=