program main
implicit none
integer :: i, len
character :: s*3, t*3

read(*,*) s
len = len_trim( s )
if( len== 2 ) then
 t = s
else
 do i = 1, 3
   t(i:i) = s(4-i:4-i)
end do
end if
write(*,'(a)') t
 


end program main
