/*
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello world!\n");
return 0;
}
*/
//
//#include <stdio.h>
//
//
//int main()
//
//
//{
//
// int i,j,k,n,x,y;
//
//
// int arr[30][30]={};
//
//
// // int res[30][30]={};
//
//
// for (i=0; i<10; i++)
//
// {
//
// for (j=0; j<10; j++)
//
// {
//
// scanf("%d",&arr[i][j]);
//
//
// }
//
//
// }
//
//
//// for (i=0; i<10; i++)
//
//// {
//
//// for (j=0; j<10; j++)
//
//// {
//
//// printf("%d ",arr[i][j]);
//
////
//
//// }
//
//// printf("\n");
//
//// }
//
//
// x=2;
//
// y=2;
//
//
// // res[x][y]=9;
//
//
// while (1)
// {
// if(arr[x][y]==2)
// {
// arr[x][y]=9;
// break;
// }
// else
// {
// arr[x][y]=9;
// }
//
// if(arr[x][y+1]!=1)
// {
// y++;
// }
// else if(arr[x+1][y]!=1)
// {
// x++;
// }
// else
// {
// break;
// }
// }
//
//
// for (i=0; i<10; i++)
// {
// for (j=0; j<10; j++)
// {
//
// printf("%d ",res[i][j]);
//
// }
//
// printf("\n");
//
// }
//
//}
//#include <stdio.h>
//int main()
//{
// int h,w,n,l,d,x,y;
// int i, j;
// int res[101][101]={0};
//
// scanf("%d %d",&h, &w);
//
// scanf("%d", &n);
//
// for (i=1; i<=n; i++)
// {
// scanf("%d %d %d %d",&l,&d,&x,&y);
//
// if (d==0)
// {
// for (j=0; j<l; j++)
// {
// res[x][y+j]=1;
// }
// }
//
// else
// {
// for (j=0; j<l; j++)
// {
// res[x+j][y]=1;
// }
// }
// }
// /*
// 5 5
// 3
// 2 0 1 1
// 3 1 2 3
// 4 1 2 4
// */
//
// for (i=1; i<=h; i++)
//
// {
//
// for (j=1; j<=w; j++)
//
// {
//
// printf("%d ",res[i][j]);
//
// }
//
//
// printf("\n");
//
// }
//
//}
/*
#include <stdio.h>
int main()
{
int i, j, n;
scanf("%d", &n);
for (i=1; ;i++)
{
n/=10;
if(n==0)
{
printf("%d",i);
break;
}
}
}
*/
#include <stdio.h>
int main()
{
char str[51];
int n, i;
gets(str);
n=strlen(str);
// printf("%d",n);
for (i=n-1; i>=0; i--)
{
printf("%c",str[i]);
}
}