#include <iostream>
#include <string>
#include <stack>
using namespace std;
int main() {
stack<char> s;
string zbor;
getline(cin, zbor);
for(int i=0; i<zbor.size(); i++)
s.push(zbor.at(i));
while(!s.empty())
{
cout<<s.top();
s.pop();
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8c3RhY2s+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCXN0YWNrPGNoYXI+IHM7CglzdHJpbmcgemJvcjsKCWdldGxpbmUoY2luLCB6Ym9yKTsKCWZvcihpbnQgaT0wOyBpPHpib3Iuc2l6ZSgpOyBpKyspCglzLnB1c2goemJvci5hdChpKSk7Cgl3aGlsZSghcy5lbXB0eSgpKQoJewoJCWNvdXQ8PHMudG9wKCk7CgkJcy5wb3AoKTsKCX0KCXJldHVybiAwOwp9