#include <iostream>
#include <string>
using namespace std;
namespace resev
{
string rvv(string oldst)
{
int i;
string newst;
int j=oldst.length();
char pp;
newst.clear();
for(i=j-1;i>=0;i--)
{
pp=oldst.at(i);
newst.append(1,pp);
}
return newst;
}
}
using namespace resev;
int main()
{
string str;
string mystr;
while(1)
{
getline(cin,str);
mystr=rvv(str);
cout <<mystr<< endl;
}
return 0;
}