#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int N;
    cin >> N;
    int p = N % 10;
    if (p == 3) {
      cout << "bon" << endl;
    } else if (p == 0 || p == 1 || p == 6 || p == 8) {
      cout << "pon" << endl;
    } else if (p == 1) {
      cout << "pon" << endl;
    } else if (p == 6) {
      cout << "pon" << endl;
    } else if (p == 8) {
      cout << "pon" << endl;
    } else {
      cout << "hon" << endl;
    }
  }
}
