#include <iostream>
#define MAX_SIZE 100001
int main() {
char buffer[MAX_SIZE];
while(fgets(buffer, MAX_SIZE, stdin)) {
char *p=buffer;
while(*p) ++p;
--p;
do {
printf("%c", *--p);
}while(p!=buffer);
printf("\n");
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKI2RlZmluZSBNQVhfU0laRSAxMDAwMDEKCmludCBtYWluKCkgewoJY2hhciBidWZmZXJbTUFYX1NJWkVdOwoJd2hpbGUoZmdldHMoYnVmZmVyLCBNQVhfU0laRSwgc3RkaW4pKSB7CgkJY2hhciAqcD1idWZmZXI7CgkJd2hpbGUoKnApICsrcDsKCQktLXA7CgkJZG8gewoJCQlwcmludGYoIiVjIiwgKi0tcCk7CgkJfXdoaWxlKHAhPWJ1ZmZlcik7CgkJcHJpbnRmKCJcbiIpOwoJfQoJcmV0dXJuIDA7Cn0=