#include "bits/stdc++.h"
using namespace std;

void Solve(){
    int a,b,c;
    cin>>a;
    int r = a%10;
    if(r==2 or r==4 or r==5 or r==7 or r==9) puts("hon");
    else if(r==0 or r==1 or r==6 or r==8) puts("pon");
    else if(r==3) puts("bon");
}

int main()
{
    //freopen("in.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    int tc; scanf("%d", &tc);
	while(tc--) {
           solve();
	}
    return 0; 
}