#include <fstream>
#include <cstring>
using namespace std;
ifstream f1("dqxau.inp");
ofstream f2("dqxau.out");
string s;
string dao(string s)
{
    if (s.length() > 0)
    {
        f2 << s[s.length()-1];
        s.erase(s.length()-1,1);
        dao(s);
    }
}
int main()
{
    while (f1 >> s)
    {
        dao(s);
        f2 << endl;
    }
    return 0;
}
