program sample
	implicit none
    character(len=3) :: a
    
    read(*,*) a
    
    if(len_trim(a)==2) then
    	write(*,*) a
    else
    	write(*,'(3a)') a(3:3),a(2:2),a(1:1)
    end if
    
    stop
end program sample