a = input()[-1]

if a == '3':

    print('bon')

elif a in list('0168'):

    print('pon')

else:

    print('hon')
x = input()[-1]

if x == '3':

    print('bon')

elif x  in  list("0168"):

    print('pon')

else:

    print('hon')
a = input()[-1]
if a == "3":
    print("bon")
elif a in list("0168"):
    print("pon")
else:
    print("hon")

x = input()[-1]
if x == "3":
    print("bon")
elif x in list("0168"):
    print("pon")
else:
    print("hon")

-a = input()[-1] -if a == "3": +x = input()[-1] +if x == "3": -elif a in list("0168"): +elif x in list("0168"):