#include <iostream>
#include <iterator>
#include <string>
using namespace std;

int main() {
    std::string a, b;
    while (cin >> a) { // 注意 while 处理多个 case
        for(auto it = a.rbegin();it != a.rend();++it){
            std::cout<<*it;
    }
}
// 64 位输出请用 printf("%lld")
}