number = gets.to_i

if 100 <= number && number <= 999
  result = number%100%10
elsif 10<=number && number<=99
  result = number%10
else
  result = number
end
puts result
if result == 3
  puts 'bon'
elsif result == 0 || result == 1 || result == 6 || result == 8
  puts 'pon'
else
  puts 'hon'
end