program therefore
 implicit none
 integer a,b
 character(len = 3) c
 read *, a
 b = mod(a,10)
 select case (b)
   case (3)
     c = 'bon'
   case (0,1,4,8)
     c = 'pon'
   case default
     c = 'hon'
 end select
 print *,c
end program therefore
 