peterverebics/CodeNet_Python_118 huggingface dataset:
T = list(input())
N = len(T)

for i in range(0, N-1):
    if T[i]+T[i+1] == "P?":
        T[i+1] = "D"
    elif T[i] == "?":
        T[i] = "D"

print("".join(T))
T = list(input())

if T[0] == '?':
    T[0] = 'P'

for i in range(1, len(T)-1):
    if T[i-1] == 'P':
        T[i] = 'D'
    elif T[i+1] == 'D':
        T[i] = 'P'
    elif T[i+1] == '?':
        T[i] = 'P'
print(T[-1])
if T[-1] == '?':
    T[-1] = 'D'

print(''.join(T))
t=input(str())
t=list(t)
for i in range(len(t)-1):
    if t[i]=='?':
        if t[i+1]=='D' or t[i+1]=='?':
            t[i]='P'
        else:
            t[i]='D'
    if t[-1]=='?':
        t[-1]='D'
print(''.join(t))
t=list(input())
a=0
for i in range(len(t)):
    if i==len(t):
        t[i]="D"
        break
    if t[i]=="?" and t[i-1]=="D":
        t[i]="P"
    elif  t[i]=="?" and t[i-1]=="P":
        t[i]="D"

    
b=""
for i in range(len(t)):
    b+=t[i]
print(b)
s = input()

for i in range(len(s)):
    if s[i] == '?':
        if s[i-1] =='P' :
#            print(s[i])
            s = s.replace('?','D',1)
        else:
#            print(s[i])
            s = s.replace('?','P',1)

#cnt = s.count('PD')
#cnt += s.count('D')

print(s)
T=list(input())
for i in range(len(T)-1):
  if T[i]=='?' and T[i+1]=='D':
    T[i]='P'
  elif T[i]=='?' and T[i+1]=='P':
    T[i]='D'
  elif T[i]=='?' and T[i+1]=='?':
    T[i]='P'
if T[-1]=='?':
  T[-1]='D'
  
print(''.join(T))
T=list(input())

for i in range(len(T)-1):
    if T[i]=='P' and T[i+1]=='?':
        T[i+1]='D'
    elif T[i]=='D' and T[i+1]=='?':
        T[i+1]='D'
A=''
for i in range(len(T)):
    A+=T[i]
print(A)
t = input()
t += "O"

str = []
i=0
while i < len(t):
  if t[i] != "?":
    str.append(t[i])
    i += 1
    continue
  elif t[i] == "?" and t[i+1] == "?":
    str.append("P")
    str.append("D")
    i += 2
  elif t[i] == "?" and t[i+1] == "D":
    str.append("P")
    i+=1
  else:
    str.append("D")
    i+=1
StrA = "".join(str)
print(StrA[:-1])
t = input()
a = 0
s = ''
for i in range(len(t)):
    if (i == 0):
        if t[0] == '?':
            s += 'P'
        else:
            s += t[0]
    else:
        if t[i] == '?':
            if s[-1] == 'P':
                s += 'D'
            else:
                s += 'P'
        else:
            s += t[i]
print(s)
t = list(input())
for i in range(len(t) - 2, -1, -1):
    if t[i] == "?":
        cnt = 0
        if t[i + 1] == "D" or t[i + 1] == "?":
            t[i] = "P"
        else:
            t[i] = "D"
if t[-1] == "?":
    t[-1] = "D"
print("".join(t))
#!/usr/bin/env python

def main():
    t = input()
    s = ['P'] + list(t)
    for i in range(len(s)):
        if s[i] == '?':
            if s[i-1] == 'P':
                s[i] = 'D'
            elif s[i-1] == 'D':
                s[i] = 'P'

    print(''.join(s[1:]))


if __name__ == '__main__':
    main()
T = input()
T = list(T)
for i in range(0, len(T)):
    if T[i] == "?":
        if T[i-1] == "D":
            T[i] = "P"
        else:
            T[i] = "D"
re = "".join(T)
print(re)
t = input()
ans = list(t)

if ans[-1] == '?':
  ans[-1] = 'D'

for i in range(-2, -len(t)-1, -1):
  if ans[i] == '?':
    if ans[i+1] == 'P':
      ans[i] = 'D'
    else:
      ans[i] = 'P'
  else:
    ans[i] = t[i]
print(''.join(ans))
t = input()

list_t = list(t)

for i in range(len(list_t)):
    if list_t[i] == '?':
        if i > 0:
            if list_t[i - 1] == 'P':
                list_t[i] = 'D'
            else:
                list_t[i] = 'D'

print(''.join(list_t))
T = input()
S = []
t0 = 'D'
for i in range(len(T)):
    if T[i] == '?':
        if t0 == 'D':
            S.append('P')
            t0 = 'P'
        else:
            S.append('D')
            t0 = 'D'
    else:
        S.append(T[i])
        t0 = T[i]
print(*S, sep='')
T = input()
for i in range(0, len(T)):
    if T[i] == "?":
        if i % 2 == 0:
            T = T.replace("?", "P")
        else:
            T = T.replace("?", "D")
print(T)
T = input()
count = 0

for c in T:
  count += 1
  if c == '?' and T[count-2] == 'D':
    c = 'P'
    print(c, end="")
  elif c == '?':
    c = 'D'
    print(c, end="")
  else:
    print(c, end="")
s = list(input())
s.append("a")
for i in range(len(s)):
    if s[i] == "?" and s[i+1] == "?":
        s[i] = "P" 
        s[i+1] = "D"
    elif s[i] == "?":
        if s[i-1] == "P":
            s[i] = "D"
        elif s[i+1] == "D":
            s[i] = "P"
print(*s[:-1],sep="")
t = list(input())
temp = ''

for i, s in enumerate(reversed(t)):
    if s == '?' and temp == 'D':
        t[len(t)-i-1] = 'P'
    elif s == '?' and temp == 'P':
        t[len(t)-i-1] = 'D'
    elif s == '?' and len(t) == len(t)-i:
        t[len(t)-i-1] = 'D'
    temp = t[len(t)-i-1]

print(*t, sep='')
t = list(input())
if t[0] == "?":
    t[0] = "D"
for i in range(1, len(t)):
    if t[i] =="?":
        if t[i-1] == "D":
            t[i] = "P"
        else:
            t[i] = "D"

print("".join(t))
pd = list(map(str,input()))
# print(pd)
for i in range(len(pd)):
    if(pd[i]=="?"):
        if(i == len(pd)-1):
            pd[i] = "D"
        else:            
            if(pd[i+1] == "D"):
                pd[i] = "P"
            else:
                pd[i] = "D"
print("".join(pd))
t = list(input())

for i in range(len(t)-1):
    if t[i] == '?':
        if t[i+1] == 'D':
            t[i] = 'P'
        else:
            t[i] = 'D'
t[-1] = 'D'


print(''.join(t))
t = list(input())
a = 0
b = 0

for i in range(len(t)):
    if i == 0 and t[i] == '?':
        t[i] = 'D'
    
    if i > 0 and t[i] == '?':
        if t[i-1] == 'P':
            t[i] = 'D'
        else:
            t[i] = 'P'

print(''.join(t))
T = input()
ans = ''
for i in range(len(T)-1):
    if T[i] == '?':
        if T[i+1] == 'D':
            ans += 'P'
        else:
            ans += 'D'
    elif T[i] == 'P':
        ans += 'P'
    else:
        ans += 'D'
            
if T[len(T)-1] == '?':
    ans += 'D'
elif T[len(T)-1] == 'P':
    ans += 'P'
else:
    ans += 'D'
print(ans)
s=input()
n=len(s)

f=''
flag=0
for i in range(n):
	if s[i]=='?' and flag==0:
		f+='P'
		flag=1
	elif s[i]=='?':
		f+='D'
	else:
		f+=s[i]
	if f[-1]=='P':
		flag=1

print(f)
s = input()
for i in range(len(s)-1):
    if s[i] == "?":
        if i != 0 and s[i-1] == "P":
            print("D", end="")
        elif s[i+1] == "D":
            print("P", end="")
        elif s[i+1] == "P":
            print("D", end="")
        else:
            print("P", end="")
    else:
        print(s[i], end="")

if s[-1] == "?":
    print("D")
else:
    print(s[-1])
t = input()

s = t.replace('?', 'D')

cnt = 0
pre = '0'

for i in s:
  if pre + i == 'PD':
    cnt += 1
  if i == 'D':
    cnt += 1
  pre = i

print(cnt)
a = input()
a = a.replace("?","D")
print(a.count("D")+a.count("PD"))
t = list(input())
for i in range(len(t)-1):
    if t[i] == '?' and t[i+1] == 'D':
        t[i] = 'P'
    elif t[i] == 'P' and t[i+1] == '?':
        t[i+1] = 'D'
ans = ''
for i in range(len(t)):
    ans+=t[i]
ans=ans.replace('??','PD')
ans.replace('?','D')
print(ans)
t = input()

res = 'D' if t[-1] == '?' else t[-1]
for c in t[-2::-1]:
    if c != '?':
        res += c
    else:
        res += 'P' if res[-1] == 'D' else 'D'

print(res[::-1])
t = input()
result = ''
c = 0
for i in t:
    if i == '?':
        if t[c-1] == 'D':
            result += 'P'
        else:
            result += 'D'
    else:
        result += i
    c += 1
print(result)
t = input()
n = len(t)

res = []

i = 0
while i < n:
    tmp = t[i:i+2]
    if tmp == '??' or tmp == '?D' or tmp == 'P?':
        res.append('PD')
    elif tmp == '?P':
        res.append('DP')
    elif tmp == 'D?':
        res.append('DD')
    else:
        res.append(tmp)
    i = i + 2

print(''.join(res))
T = input()
N = len(T)
after_T = ''

pos = 0

while(pos < N-1):

    next_c=T[pos:pos+2]
    
    if(next_c == 'P?' or next_c == '??' or next_c == '?D' or next_c=='PD'):
        after_T+='PD'
        pos+=2
    else:
        after_T+='D'
        pos+=1

if(len(after_T) != N):
    if(T[N-1] != '?'):
        after_T += T[N-1]
    else:
        after_T += 'D'

print(after_T)
t = list(input())

for i in range(1, len(t)):
    if t[i-1] == "P" and t[i] == "?":
        t[i] = "D"
    elif t[i-1] == "D" and t[i] == "?":
        t[i] = "P"

print("".join(t))
word = input()
start = 0
end = len(word)
while(True):
	i = word.find('?', start, end)
	if (i == -1):
		break
	elif ((i == (end-1)) or (word[i-1] == 'P')):
		word.replace('?', "D", 1)
	elif ((word[i+1] == "?") or (word[i+1] == "D")):
		word.replace('?', "P", 1)
	start = i + 1
print(word)
T=input()

L=len(T)
U=[]
for i in range(L):
    U.append(T[i])
U.append("P")

for i in range(L,-1,-1):
    if U[i]=="?":
        if U[i+1]=="P":
            U[i]="D"
        else:
            U[i]="P"

for x in U[:-1]:
    print(x,end="")
print()
t=list(input())
n=len(t)
for i in range(n):
  if t[i]=='D':
    continue
  elif t[i]=='P' and i<n-1:
    if t[i+1]=='D':
      continue
    elif t[i+1]=='?':
      t[i+1]='D'
  else:
    if i<n-1:
      if t[i+1]=='P':
        t[i]='D'
      else:
        t[i]='P'
print(''.join(t))
t=list(input())
a=0
for i in range(len(t)):
    if t[i]=="?" and t[i-1]=="D":
        t[i]="P"
    elif  t[i]=="?" and t[i-1]=="P":
        t[i]="D"
b=""
for i in range(len(t)):
    b+=t[i]
print(b)
t=list(input())
for i in range(len(t)-1):
    if (i + 1 == len(t)):
        break
    if(t[i+1]=="D" and t[i]=="?" ):
        t[i]="P"
t = ''.join(t)
t=t.replace("?", "D")
print(t)
N = str(input())
num = N[-1]
num = int(num)
 
if num == 3:
  print('bon')
elif num == 0 or num==1 or num==6 or 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 = int(input())
if (N%10 == 2) or (N%10 == 4) or (N%10 == 5) or (N%10 == 7) or (N%10 == 9):
    print("hon")
elif (N%10 == 0) or (N%10 == 1) or (N%10 == 6) or (N%10 == 8):
    print("pon")
else:
    print("bon")
a=input()
n=int(a[len(a)-1])
l=[2,4,5,7,9]
if n in l:
    print("hon")
elif n != 3:
    print("pon")
else:
    print("bon")
a = int(input()[-1])

if a in [2, 4, 5, 7, 9]:
    print("hon")
elif a in [0, 1, 6, 8]:
    print("pon")
else:
    print("bon")
n = int(input())

n = n%10

if n == 3:
    print("bon") 
elif n == 0 or n == 1 or n == 6 or n == 8:
    print("pon") 
else:
    print("hon")
from sys import stdin
from collections import deque, Counter, defaultdict
import heapq

INF = int(1e10)
MOD = int(1e9 + 7)

def input():
    return stdin.readline()[:-1]

def main():
    from builtins import int, map
    N = int(input())
    N %= 10
    if N in set({2, 4, 5, 7, 9}):
        print("hon")
    elif N in set({0, 1, 6, 8}):
        print("pon")
    else:
        print("bon")

if __name__ == '__main__':
    main()
n = int(input())
n = n%10
if n == 2 or n == 4 or n == 5 or n == 7 or n == 9:
    print("hon")
elif n == 3:
    print("bon")
else:
    print("pon")
N = list(input())
a = ['3']
b = ['0','1','6','8']
if N[-1] in a:
    print('bon')
elif N[-1] in b:
    print('pon')
else:
    print('hon')
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

n = int(input())

a = n % 10

if a == 2 or a == 4 or a == 5 or a == 7 or a == 9:
    print("hon")
elif a == 0 or a == 1 or a == 6 or a == 8:
    print("pon")
else:
    print("bon")
N = int(input())
base = N%10
if base in [2,4,5,7,9]:
    print('hon')
elif base in [0,1,6,8]:
    print('pon')
elif base == 3:
    print('bon')
N = int(input())
A = [2, 4 , 5, 7, 9]
B = [0, 1, 6, 8]
C = [3]

if N%10 in A:
  print("hon")
if N%10 in B:
  print("pon")
if N%10 in C:
  print("bon")
n=int(input())
n=n%10
if n==3:
    print('bon')
    exit()
l=[0,1,6,8]
if n in l:
    print('pon')
else:
    print('hon')
def main():
    n = input()

    if n[-1] in ['2','4','5','7','9']:
        print('hon')
        return
    elif n[-1] in ['0','1','6','8']:
        print('pon')
        return
    else:
        print('bon' )


if __name__ == '__main__':
    main()
s = input()
#n = s.length()
if s[-1] in ['2','4','5','7','9']:
  print('hon')
elif s[-1] in ['0','1','6','8']:
  print('pon')
else:
  print('bon')
import sys
input = sys.stdin.readline
def main():
    N = list(input().rstrip())
    l = len(N)-1
    n = int(N[l])
    if n == 3:
        print('bon')
    elif n == 0 or n == 1 or n == 6 or n == 8:
        print('pon')
    else:
        print('hon')

if __name__ == '__main__':
    main()
def main():
  N = int(input())

  d = N % 10

  if(d == 2 or d == 4 or d == 5 or d == 7 or d == 9):
    print("hon")
  elif(d == 0 or d == 1 or d == 6 or d == 8):
    print("pon")
  elif(d == 3):
    print("bon")
  

if __name__ == "__main__":
  main()
n = int(input())
rem = n%10
if rem == 3:
  print("bon")
elif rem == 0 or rem == 1 or rem == 6 or rem == 8:
  print("pon")
else:
  print("hon")
n = input()[-1]
if n in '24579':
    print('hon')
elif n in '0168':
    print('pon')
else:
    print('bon')
N = int(input()[-1])
if N in [2,4,5,7,9]:
  print('hon')
elif N in [0,1,6,8]:
  print('pon')
elif N in [3]:
  print('bon')
s = input()
k = int(s[-1])
if k == 3:
  print('bon')
elif k in [0, 1, 6, 8]:
  print('pon')
else:
  print('hon')
N=input()
if N[-1]=="3":
    print("bon")
elif N[-1] in {"0","1","6","8"}:
    print("pon")
else:
    print("hon")
n = input()
h = "24579"
p = "0168"
b = "3"
if n[len(n)-1] in h:
  print("hon")
elif n[len(n)-1] in p:
  print("pon")
else:
  print("bon")
n=input()
if int(n[-1]) in [2, 4, 5, 7, 9]:
  print("hon")
elif int(n[-1]) in [0, 1, 6, 8]:
  print("pon")
else:
  print("bon")
n = int(input())
a = n % 10
if a == 2 or a == 4 or a == 5 or a == 7 or a == 9 :
 print ("hon")
elif a == 0 or a == 1 or a == 6 or a == 8 :
 print ("pon")
else :
 print ("bon")
n = input()
if n[-1] in ['2','4','5','7','9']:
    print('hon')
elif n[-1] in ['0','1','6','8']:
    print('pon')
else:
    print('bon')
N = int(input())

x = N%10

if x in [2, 4, 5, 7, 9]:
    print('hon')
elif x in [0, 1, 6, 8]:
    print('pon')
else:
    print('bon')
import sys


input = sys.stdin.readline


def main():
    m = N % 10
    if m in [2, 4, 5, 7, 9]:
        print("hon")
    elif m in [0, 1, 6, 8]:
        print("pon")
    else:
        print("bon")


if __name__ == "__main__":
    N = int(input())
    main()
N=int(input())
a=[2,4,5,7,9]
b=[0,1,6,8]
f=N%10
if f in a:
  print("hon")
elif f in b:
  print("pon")
else:
  print("bon")
N = int(input()) % 10
if N in [2,4,5,7,9]:
    print('hon')
elif N in [0,1,6,8]:
    print('pon')
else:
    print('bon')
from copy import copy, deepcopy
from collections import Counter
from math import sqrt, floor, factorial
from itertools import permutations, combinations, combinations_with_replacement
from operator import mul
from functools import reduce
import bisect

MOD = 10**9 + 7
INF = float('inf')

N = int(input())

A = {2, 4, 5, 7, 9}

if N % 10 in A:
    print("hon")
elif N % 10 == 3:
    print("bon")
else:
    print("pon")
n = input()
if n[-1] == '3':
  print("bon")
elif n[-1] in ["0", "1", "6", "8"]:
  print("pon")
else:
  print("hon")
N = int(input())
P = {2,4,5,7,9}
H = {0,1,6,8}
if N%10 in P:
    print("hon")
elif N%10 in H:
    print("pon")
else:
    print("bon")
n=int(input())%10
if n in[2,4,5,7,9]:
    print("hon")
elif n==3:
    print("bon")
else:
    print("pon")
N = int(input())
kurai_1 = N % 10
hon_yomi = {
    0:'pon',
    1:'pon',
    2:'hon',
    3:'bon',
    4:'hon',
    5:'hon',
    6:'pon',
    7:'hon',
    8:'pon',
    9:'hon'
}
print(hon_yomi[kurai_1])
data = input()
name = ['pon','pon','hon', 'bon','hon','hon','pon','hon','pon','hon']
print(name[int(data[-1])])
n = input()
pon = ['0','1','6','8']
last = n[-1]
if last == '3':
  print('bon')
elif last in pon:
  print('pon')
else:
  print('hon')
N = int(input())
Nmod = N % 10

if Nmod == 3:
    print('bon')
elif Nmod <= 1 or Nmod == 6 or Nmod == 8:
    print('pon')
else:
    print('hon')
N = input()

if N[-1] == "3":
    print("bon")
elif N[-1] in ["0","1","6","8"]:
    print("pon")
else:
  	print("hon")
#! /usr/bin/env python3

# from math import gcd
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement

N = input()

hon = [2, 4, 5, 7, 9]
pon = [0, 1, 6, 8]
bon = [3]

if int(N[-1]) in hon:
    print("hon")
elif int(N[-1]) in pon:
    print("pon")
else:
    print("bon")
N = int(input())
ans=N%10
if ans == 3:
    print('bon')
elif ans in [0, 1, 6, 8]:
    print('pon')
else:
    print('hon')
n = int(input())
if (n%10) in [2, 4, 5, 7, 9]:
    print("hon")
elif (n%10) in [0, 1, 6, 8]:
    print("pon")
else:
    print("bon")
n=int(input())
a=[2,4,5,7,9]
x=n%10
if x in a:
  print("hon")
elif x==3:
  print("bon")
else:
  print("pon")
n = int(input())
ls = [2,4,5,7,9]
if n % 10 in ls:
    print("hon")
elif n % 10 == 3:
    print("bon")
else:
    print("pon")
N = int(input())
ans = "hon"
a = N % 10
if a in [0, 1, 6, 8]:
  ans = "pon"
if a == 3:
  ans = "bon"

print(ans)
a=input()
if a[-1] == "3":
  print("bon")
elif a[-1] == "0" or a[-1] == "1" or a[-1] == "6" or a[-1] == "8":
  print("pon")
else:
  print("hon")
a = int(input())

if a % 10 in [2,4,5,7,9]:
    print('hon')
elif a % 10 in [0,1,6,8]:
    print('pon')
else:
    print('bon')
n = int(input())
k = n%10
if k == 3:
    print('bon')
elif k==0 or k==1 or k==6 or k==8:
    print('pon')
else:
    print('hon')
def main():
    n = input()
    if n[-1] in '24579':
        print('hon')
    elif n[-1] in '0168':
        print('pon')
    elif n[-1] in '3':
        print('bon')

if __name__ == "__main__":
    main()
n = int(input())

if n%10 == 3 :
    print("bon")
elif n%10 == 0 or n%10 == 1 or n%10 == 6 or n%10 == 8 :
    print("pon")
else :
    print("hon")
N=int(input())
n=N%10
if n==3:
    print("bon")
elif n==0 or n==1 or n==6 or n==8:
    print("pon")
else:
    print("hon")
hon = ['2','4','5','7','9']
pon = ['0','1','6','8']

n = input()

if n[-1] in hon:
    print('hon')
elif n[-1] in pon:
    print('pon')
else:
    print('bon')
n = input()
hon =[2,4,5,7,9]
pon = [0,1,6,8]
bon = [3]

if int(n[-1]) in hon:
    print("hon")
elif int(n[-1]) in pon:
    print("pon")
else:
    print("bon")
n = str(input())
num = int(n[-1])

if num in [2, 4, 5, 7, 9]:
    print("hon")
elif num in [0, 1, 6, 8]:
    print("pon")
else:
    print("bon")
n = list(input())
k = int(n[-1])

if k in (0,1,6,8):
    print("pon")
elif k == 3:
    print("bon")
else:
    print("hon")
def main():
    import sys
    input = sys.stdin.readline
    N = int(input())
    if N % 10 in (2,4,5,7,9):
        print("hon")
    elif N % 10 in (0,1,6,8):
        print("pon")
    else:
        print("bon")

if __name__ == '__main__':
    main()
N = int(input())
a = N % 10
if a == 2 or a == 4 or a ==5 or a == 7 or a == 9:
    print('hon')
elif a == 3:
    print('bon')
else:
    print('pon')
n=int(input())%10
if n in [ 2, 4, 5, 7,9]:
  print('hon')
elif n in [0,1,6,8]:
  print('pon')
else:
  print('bon')
N=input()

one=int(N[-1])


if(one==2 or one==4 or one==5 or one==7 or one==9):
    print("hon")
elif(one==0 or one==1 or one==6 or one==8):
    print("pon")
else:
    print("bon")
n = input()

hon = ['2','4','5','7','9']
pon = ['0','1','6','8']
bon = ['3']

if n[-1] in bon:
    print('bon')
elif n[-1] in hon:
    print('hon')
elif n[-1] in pon:
    print('pon')
N = int(input())

n = N % 10

if n == 3 :
    print("bon")

elif n in(0,1,6,8) :
    print("pon")

elif n in (2,4,5,7,9):
    print("hon")
N = int(input())

if N % 10 in [2, 4, 5, 7, 9]:
    print('hon')
elif N % 10 in [0, 1, 6, 8]:
    print('pon')
elif N % 10 in [3]:
    print('bon')
n=str(input())
if n[len(n)-1]=="3":
    print("bon")
elif n[len(n)-1]=="2" or n[len(n)-1]=="4" or n[len(n)-1]=="5" or n[len(n)-1]=="7" or n[len(n)-1]=="9":
    print("hon")
else:
    print("pon")
N = int(input())
nStr = str(N)
digit = int(nStr[-1])
hon = [2,4,5,7,9]
pon = [0,1,6,8]
bon = [3]
if digit in hon:
	print('hon')
elif digit in pon:
	print('pon')
else:
	print('bon')
n = int(input())
n = n % 10
if n == 2 or n == 4 or n == 5 or n == 7 or n == 9:
    print("hon")
elif n == 0 or n == 1 or n == 6 or n == 8:
    print("pon")
else:
    print("bon")
L = list(input())

if L[len(L)-1]=='3':
	print('bon')
elif L[len(L)-1]=='0' or L[len(L)-1]=='1' or L[len(L)-1]=='6' or L[len(L)-1]=='8':
	print('pon')
else:
	print('hon')
N = input("")
t = N[-1]
pon = ["0", "1", "6" ,"8"] 
bon = "3"
if t == bon:
    print("bon")
elif t in pon:
    print("pon")
else:
    print("hon")
n = int(input())%10
if n in [2, 4, 5, 7, 9]:
    print("hon")
elif n in [0, 1, 6, 8]:
    print("pon")
else:
    print("bon")
n = int(input()[-1])

if n in [2, 4, 5, 7, 9]:
  print("hon")
elif n in [0, 1, 6, 8]:
  print("pon")
else:
  print("bon")
n = int(input())
while n >= 10:
    n = n % 10

if n == 2 or n==4 or n == 5 or n==7 or  n== 9:
    print('hon')
elif n == 0 or n==1 or n == 6 or n==8:
    print('pon')
elif n== 3:
    print('bon')
n = int(input())
a = ['pon', 'pon', 'hon', 'bon', 'hon', 'hon', 'pon', 'hon', 'pon', 'hon']
print(a[n%10])
n = int(input())
if n % 10 == 3:
  print('bon')
elif n % 10 == 0 or n % 10 == 1 or n % 10 == 6 or n % 10 == 8:
  print('pon')
else:
  print('hon')
N = int(input())
L = int(str(N)[-1])

if L==3:
  print("bon")
elif L in [0,1,6,8]:
  print("pon")
else:
  print("hon")
N = int(input())
x = N % 10
hon = [2,4,5,7,9]
pon = [0,1,6,8]
bon = [3]
if x in hon:
    print('hon')
elif x in pon:
    print('pon')
elif x in bon:
    print('bon')
hon = [2,4,5,7,9]
pon = [0,1,6,8]
s = input()
s = s[::-1]
hantei = int(s[0])
if hantei in hon:
  print('hon')
elif hantei in pon :
  print('pon')
else:
  print('bon')
N = int(input())
mod = N%10
if mod == 3:
    print("bon")
elif mod in {0, 1, 6, 8}:
    print("pon")
else:
    print("hon")
n = input()

if n[-1]=="3":
    print("bon")
elif n[-1]=="0" or\
     n[-1]=="1" or\
     n[-1]=="6" or\
     n[-1]=="8" :
    print("pon")
else:
    print("hon")
n = int(input())

if n % 10 == 3:
    print("bon")

elif n % 10 in [0,1,6,8]:
    print("pon")
    
else:
    print("hon")
import sys
input = sys.stdin.readline

N = input().rstrip()
N = N[::-1]

if N[0] == "3":
    print("bon")
elif N[0] == "0" or N[0] == "1" or N[0] == "6" or N[0] == "8":
    print("pon")
else:
    print("hon")
var = (input())
end = var[-1]
end = int(end)

hon_list = [2, 4, 5, 7, 9]
pon_list = [0, 1, 6, 8]
bon_list = [3]

HON = "hon"
PON = "pon"
BON = "bon"

if end in hon_list:
    print(HON)
elif end in pon_list:
    print(PON)
elif end in bon_list:
    print(BON)
N = input()
if N[-1:] == "2" or N[-1:] == "4" or N[-1:] == "5" or N[-1:] == "7" or N[-1:] == "9":
    print('hon')
elif N[-1:] == "0" or N[-1:] == "1" or N[-1:] == "6" or N[-1:] == "8":
    print('pon')
else:
    print("bon")
N = input()
s = N[-1]


if s in "24579":
    print("hon")
elif s in "0168":
    print("pon")
else:
    print("bon")
N = int(input())
tmp = N % 10

if tmp == 2 or tmp == 4 or tmp == 5 or tmp == 7 or tmp == 9:
    print('hon')
elif tmp == 0 or tmp == 1 or tmp == 6 or tmp == 8:
    print('pon')
else:
    print('bon')
n=int(input()[-1])
if n==3:
    res="bon"
elif n in [0,1,6,8]:
    res="pon"
else:
    res="hon"
print(res)
import sys
def input(): return sys.stdin.readline().rstrip()

N = input()

if int(N[-1]) in [2,4,5,7,9]:
    print("hon")
elif int(N[-1]) in [0,1,6,8]:
    print("pon")
else:
    print("bon")
n = int(input())


if n%10 == 0 or n%10 ==1 or n%10 ==6 or n%10 ==8:
    print("pon")
elif n%10 == 3:
    print("bon")
else:
    print("hon")
import numpy as np
import sys
import math

N = input()
a = N[::-1][0]

if a == "3":
    print("bon")
elif a == "0" or a == "1" or a == "6" or a == "8":
    print("pon")
else:
    print("hon")
n = input()
s=n[-1]
if s in ['2','4','5','7','9']:
    print('hon')
elif s in ['0','1','6','8']:
    print('pon')
else:
    print('bon')
from math import *
from sys import stdin,stdout
input=stdin.buffer.readline

n=int(input())
d=n%10
if d==2 or d==4 or d==5 or d==7 or d==9:
	print("hon")
elif d==0 or d==1 or d==6 or d==8:
	print("pon")
else:
	print("bon")
n=input()

if n[-1] == '3':
  print('bon')
elif n[-1] == '0' or n[-1] == '1' or n[-1] == '6' or n[-1] == '8':
  print('pon')
else:
  print('hon')