x = input()

n = int(x)
cnt = 0
while n>1:
  n = n/10
  cnt+=1

print(x[cnt-1])

# x[cnt-1]が1桁目
s = int(x[cnt-1])
if s == 3:
  print("bon")
elif s == 0 or s == 1 or s == 6 or s == 8:
  print("pon")
else:
  print("hon")