#include <stdio.h>
int b;
int c=0;
int a=0;
char words1[3000];
char words2[3000];
int main()
{
while((c=getchar())!=EOF)
{
if( c!= '\n')
{words1[a]=c;
++a;
}
else
{
for(b=0; b<=a-1; ++b)
{
words2[b] = words1[a-1-b];
putchar(words2[b]);
}
printf("\n");
a=0;
}
}
return 0;
}