Language: C++

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

// Type Aliases
template <class T>
using vec = vector<T>;
template <class T>
using vvec = vec<vec<T>>;
template <class T, class U>
using pairs = vector<pair<T, U>>;
template <class T>
using pqueue = priority_queue<T>;
using ll = long long;
using vll = vec<ll>;
using vvll = vvec<ll>;
using pll = pair<ll, ll>;
using vpll = pairs<ll, ll>;

// constants
static const ll INF = 1LL << 50;
static const double dINF = 1e290;
static const ll MOD = (ll)1e9 + 7;
//static const ll MOD = (ll)1e9+9;
//static const ll MOD = 998244353;

#define endl "\n"
#define rep(i, n) for (ll(i) = 0; (i) < (n); (i)++)
#define range(i, a, b) for (ll(i) = (a); (i) <= (b); (i)++)

#define all(v) (v).begin(), (v).end()
#define asc(v) sort(all(v))
#define desc(v) sort((v).rbegin(), (v).rend())

#define fold(src, dst, lambda) partial_sum(all(src), (dst).begin(), lambda)
#define rfold(src, dst, lambda)                   \
    reverse(all(src));                            \
    partial_sum(all(src), (dst).begin(), lambda); \
    reverse(all(dst));
#define cumsum(src, dst) fold(src, dst, [](auto &a, auto &b) { return a + b; })
#define sum(v) accumulate(all(v), 0, [](auto &a, auto &b) { return a + b; })

#define del(v, i) (v).erase((v).begin() + i)
#define uniq(v) \
    asc(v);     \
    (v).erase(unique(all(v)), (v).end())

template <typename T>
T min(vec<T> v)
{
    return *min_element(all(v));
}
template <typename T>
T max(vec<T> v)
{
    return *max_element(all(v));
}

// io helper
template <typename T>
void debug(T t)
{
    cerr << t << endl;
}
template <typename T, typename... Args>
void debug(T t, Args... args)
{
    cerr << t << " ";
    debug(args...);
}
template <typename T>
void out(T t)
{
    cout << t << endl;
}
template <typename T, typename... Args>
void out(T t, Args... args)
{
    cout << t << " ";
    out(args...);
}
template <typename T>
istream &operator>>(istream &is, vec<T> &v)
{
    for (auto &a : v)
        is >> a;
    return is;
}
template <typename T>
ostream &operator<<(ostream &os, vec<T> &v)
{
    os << "[";
    REP(i, v.size() - 1)
    os << v[i] << ", ";
    os << v[v.size() - 1] << "]";
    return os;
}
template <typename T, typename U>
ostream &operator<<(ostream &os, pair<T, U> &p)
{
    os << "(" << p.first << ", " << p.second << ")";
    return os;
}
template <size_t N, typename T>
ostream &operator<<(ostream &os, array<T, N> &v)
{
    os << "[";
    REP(i, N - 1)
    os << v[i] << ", ";
    os << v[N - 1] << "]";
    return os;
}
template <typename T, typename U>
ostream &operator<<(ostream &os, map<T, U> &mp)
{
    os << "{ ";
    for (auto &p : mp)
        os << p.first << ": " << p.second << ", ";
    os << "}";
    return os;
}

void solve()
{
    ll N;
    cin >> N;
    ll c = N % 10;
    switch (c)
    {
    case 3:
        out("bon");
        break;
    case 0:
    case 1:
    case 6:
    case 8:
        out("pon");
        break;
    default:
        out("hon");
        break;
    }
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.setf(ios::fixed);
    cout.precision(20);
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'std::ostream& operator<<(std::ostream&, vec<T>&)':
a.cc:92:9: error: 'i' was not declared in this scope
   92 |     REP(i, v.size() - 1)
      |         ^
a.cc:92:25: error: expected ';' before 'os'
   92 |     REP(i, v.size() - 1)
      |                         ^
      |                         ;
   93 |     os << v[i] << ", ";
      |     ~~                   
a.cc: In function 'std::ostream& operator<<(std::ostream&, std::array<T, N>&)':
a.cc:107:9: error: 'i' was not declared in this scope
  107 |     REP(i, N - 1)
      |         ^
a.cc:107:5: error: there are no arguments to 'REP' that depend on a template parameter, so a declaration of 'REP' must be available [-fpermissive]
  107 |     REP(i, N - 1)
      |     ^~~
a.cc:107:5: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
a.cc:107:18: error: expected ';' before 'os'
  107 |     REP(i, N - 1)
      |                  ^
      |                  ;
  108 |     os << v[i] << ", ";
      |     ~~