N = str(input())
num = N[-1]
num = int(num)
 
if num == 3:
  print('bon')
elif num == 0:
  print('pon')
elif num == 1:
  print('pon')
elif num == 6:
  print('pon')
elif num == 8:
  print('pon')
elif num ==2:
  print('hon')
elif num == 4:
  print('hon')
elif num==5:
  print('hon')
elif num==7:
  print('hon')
elif num==9:
  print('hon')
N = str(input())
num = N[-1]
 
if num == 3:
  print('bon')
elif num == 0:
  print('pon')
elif num == 1:
  print('pon')
elif num == 6:
  print('pon')
elif num == 8:
  print('pon')
elif num ==2:
  print('hon')
elif num == 4:
  print('hon')
elif num==5:
  print('hon')
elif num==7:
  print('hon')
elif num==9:
  print('hon')