#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
void reverseString(string &s)
{
int i, j;
for (i = 0, j = s.size() - 1; i < j; ++i, --j)
{
swap(s[i], s[j]);
}
}
int main()
{
string str;
while(cin>>str) {
reverseString(str);
cout << str;
system("pause");
}
return 0;
}