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