#include <cstdio>

void SwapStr(char *str){
	char *st,*end,*pt,*ptr;
	st = str;
	for(end = st;*end != '\0';end++){}
	pt = st;
	ptr = end - 1;
	char c;
	while(pt < ptr){
		c = *pt;
		*pt = *ptr;
		*ptr = c;
		pt++;
		ptr--;
	}
	
}

int main(){
	char str[21];
	while(scanf("%s",str) != EOF){
		SwapStr(str);
		printf("%s\n",str);
	}
	return 0;
}