#include <stdio.h>
#include <string.h>

char str[30] ;

int main ( )
{
	while ( scanf ( "%s" , str ) == 1 ) {
		for ( int i = strlen ( str ) - 1 ; i >= 0 ; i-- ) {
			putchar ( str[i] ) ;
		}
		putchar ( '\n' ) ;
	}
	return 0 ;
}