#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
ifstream f("var17.in");
ofstream g("var17.out");
char s[256];
int i;
void inversare(char s[])
{ int i,j;
char c;
for(i=0,j=strlen(s)-1;i<j;i++,j--)
c=s[i], s[i]=s[j], s[j]=c;
}
int main()
{
for (i=1; i<=3; ++i)
{
f.getline(s,256);
inversare(s);
g << s << "\n";
}
}