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

    stop
contains
end program prob42