#include <bits/stdc++.h>
using namespace std;
long long md = 1000000007;
long long ma = 998244353;
long long pw(long long a, long long b) {
  long long c = 1, m = a;
  while (b) {
    if (b & 1) c = (c * m);
    m = (m * m);
    b /= 2;
  }
  return c;
}
long long pwmd(long long a, long long b) {
  long long c = 1, m = a;
  while (b) {
    if (b & 1) c = ((c * m)) % md;
    m = (m * m) % md;
    b /= 2;
  }
  return c;
}
long long modinv(long long n) { return pwmd(n, md - 2); }
long long min(long long a, long long b) {
  if (a >= b) return b;
  return a;
}
int binomialCoeff(long long n, long long k) {
  long long res = 1;
  if (k > n - k) k = n - k;
  for (long long i = 0; i < k; ++i) {
    res *= (n - i);
    res /= (i + 1);
  }
  return res;
}
void solve() {
  string s;
  cin >> s;
  long long g = s.size() - 1;
  if (s[g] == 2 || s[g] == 5 || s[g] == 7 || s[g] == 9)
    cout << "hon\n";
  else if (s[g] == 0 || s[g] == 1 || s[g] == 6 || s[g] == 8)
    cout << "pon\n";
  else
    cout << "bon\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long t;
  cin >> t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
