#include <iostream>
#include <stack>

int main(void) {
    std::stack<char> st;

    for (char ch; std::cin >> ch; st.push(ch));
    do {
        std::cout << st.top();
        st.pop();
    } while (!st.empty());
    std::cout << std::endl;

    return 0;
}