fun main() {
    val n = readLine()?.toInt()

    val n_length = n.toString().length

    val one = when(n_length) {
        1 -> n
        2 -> n?.rem(10)
        else -> (n?.rem(100) ?: 0) % 10
    }

    println(n_length)

    println(when(one) {
        2, 4, 5, 7, 9 -> "hon"
        0, 1, 6, 8 -> "pon"
        3 -> "bon"
        else -> throw Exception("unexpected number")
    })
}