#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  string s;
  std::cin >> s;
  int ans = 0;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == '3') {
      std::cout << "bon\n";
      return 0;
    }
    if (s[i] == '0' || s[i] == '1' || s[i] == '6' || s[i] == '8') ++ans;
  }
  if (!ans) {
    std::cout << "hon\n";
  } else {
    std::cout << "pon\n";
  }
  return 0;
}
