#include <iostream>
#include <string>

int main() {
    std::string s;
    std::string r;

    std::getline(std::cin, s);
    r.reserve(s.length());

    for (int i = s.length() - 1; i >= 0; i--) {
        r.push_back(s[i]);
    }

    std::cout << r << '\n';
}