#include<iostream>
#include<cstdio>
#include<vector>
#include<bits/stdc++.h>
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+CiNpbmNsdWRlPGNzdGRpbz4KI2luY2x1ZGU8dmVjdG9yPgojaW5jbHVkZTxiaXRzL3N0ZGMrKy5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgTGVuZ3RoKHN0cmluZyBzKQp7CmludCBsZW49MDsKZm9yKGludCBpPTA7c1tpXSE9J1wwJztpKyspCnsKbGVuKys7Cn0KcmV0dXJuIGxlbjsKfQpzdHJpbmcgUmV2ZXJzZShzdHJpbmcgcykKewpzdHJpbmcgcmVzPSIgIjsKaW50IGxlbnM9TGVuZ3RoKHMpOwpmb3IoaW50IGk9bGVucy0xO2k+PTA7aS0tKQp7CnJlcz1yZXMrc1tpXTsKfQpyZXR1cm4gcmVzOwp9CmludCBtYWluKCkKewpzdHJpbmcgczsKY2luPj5zOwpjb3V0PDxSZXZlcnNlKHMpOwpyZXR1cm4gMDsKfQo=