#include <iostream>
using namespace std;
int main() {
string s;
cin>>s;
for(int i=s.length()-1; i>=0; i--) {
cout<<s[i];
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglzdHJpbmcgczsKCWNpbj4+czsKCWZvcihpbnQgaT1zLmxlbmd0aCgpLTE7IGk+PTA7IGktLSkgewoJCWNvdXQ8PHNbaV07Cgl9CglyZXR1cm4gMDsKfQ==