Language: Java

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 

using namespace __gnu_pbds; 
using namespace std;

using   ll=long long;
using   ld=long double;

#define fast        	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ordered_set 	tree<pll, null_type,less<pll>, rb_tree_tag,tree_order_statistics_node_update>
#define endl        	"\n"
#define int         	long long int  
#define pb          	push_back
#define mp          	make_pair
#define F           	first
#define S           	second
#define pll         	pair<ll,ll>
#define vec     		vector<ll>
#define ALL(v)      	v.begin(),v.end()
#define ALLR(v)     	v.rbegin(),v.rend()
#define pii         	3.14159265358979323
#define inf     		LLONG_MAX
#define ones(x)     	__builtin_popcount(x)
#define fill(a,b)   	memset(a,b,sizeof(a))
#define mod 			1000000007

ll mod_pow(ll a,ll b)
{
    ll res = 1;
    while(b)
    {
        if(b&1) res=(res*a)%mod;
        a=(a*a)%mod;
        b>>=1;
    }
    return res;
}

ll mod_inverse(ll a)
{
	return mod_pow(a,mod-2);
}

void solve()
{
	string s;
	
	cin >> s;
	
	map< int , string > mp1;
	
	mp1[0] = mp1[1] = mp1[6]= mp1[8] = "pon";
	
	mp1[2] = mp1[4] = mp1[5] = mp1[7] = mp1[9] = "hon";
	
	mp1[3] = "bon";
	
	cout<<mp1[s[0]-'0'];
}

signed main()
{
    fast;
	
    ll t;
    
    t=1;
    
    //cin>>t;
    
    while(t--)
    {
        solve();
    }
 
    return 0;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include<bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<bits/stdc++.h>
        ^
Main.java:2: error: illegal character: '#'
#include <ext/pb_ds/assoc_container.hpp> 
^
Main.java:3: error: illegal character: '#'
#include <ext/pb_ds/tree_policy.hpp> 
^
Main.java:6: error: class, interface, enum, or record expected
using namespace std;
^
Main.java:8: error: unnamed classes are a preview feature and are disabled by default.
using   ll=long long;
^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: '.class' expected
using   ll=long long;
                ^
Main.java:9: error: '.class' expected
using   ld=long double;
                ^
Main.java:11: error: illegal character: '#'
#define fast        	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
^
Main.java:11: error: class, interface, enum, or record expected
#define fast        	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
        ^
Main.java:11: error: class, interface, enum, or record expected
#define fast        	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
                    	                              ^
Main.java:11: error: class, interface, enum, or record expected
#define fast        	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
                    	                                          ^
Main.java:12: error: illegal character: '#'
#define ordered_set 	tree<pll, null_type,less<pll>, rb_tree_tag,tree_order_statistics_node_update>
^
Main.java:13: error: illegal character: '#'
#define endl        	"\n"
^
Main.java:14: error: illegal character: '#'
#define int         	long long int  
^
Main.java:15: error: illegal character: '#'
#define pb          	push_back
^
Main.java:16: error: illegal character: '#'
#define mp          	make_pair
^
Main.java:17: error: illegal character: '#'
#define F           	first
^
Main.java:18: error: illegal character: '#'
#define S           	second
^
Main.java:19: error: illegal character: '#'
#define pll         	pair<ll,ll>
^
Main.java:20: error: illegal character: '#'
#define vec     		vector<ll>
^
Main.java:21: error: illegal character: '#'
#define ALL(v)      	v.begin(),v.end()
^
Main.java:22: error: illegal character: '#'
#define ALLR(v)     	v.rbegin(),v.rend()
^
Main.java:23: error: illegal character: '#'
#define pii         	3.14159265358979323
^
Main.java:24: error: illegal character: '#'
#define inf     		LLONG_MAX
^
Main.java:25: error: illegal character: '#'
#define ones(x)     	__builtin_popcount(x)
^
Main.java:26: error: illegal character: '#'
#define fill(a,b)   	memset(a,b,sizeof(a))
^
Main.java:27: error: illegal character: '#'
#define mod 			1000000007
^
Main.java:32: error: class, interface, enum, or record expected
    while(b)
    ^
Main.java:35: error: class, interface, enum, or record expected
        a=(a*a)%mod;
        ^
Main.java:36: error: class, interface, enum, or record expected
        b>>=1;
        ^
Main.java:37: error: class, interface, enum, or record expected
    }
    ^
Main.java:39: error: class, interface, enum, or record expected
}
^
Main.java:44: error: class, interface, enum, or record expected
}
^
Main.java:50: error: class, interface, enum, or record expected
	cin >> s;
	^
Main.java:54: error: class, interface, enum, or record expected
	mp1[0] = mp1[1] = mp1[6]= mp1[8] = "pon";
	^
Main.java:56: error: class, interface, enum, or record expected
	mp1[2] = mp1[4] = mp1[5] = mp1[7] = mp1[9] = "hon";
	^
Main.java:58: error: class, interface, enum, or record expected
	mp1[3] = "bon";
	^
Main.java:60: error: class, interface, enum, or record expected
	cout<<mp1[s[0]-'0'];
	^
Main.java:61: error: class, interface, enum, or record expected
}
^
Main.java:69: error: class, interface, enum, or record expected
    t=1;
    ^
Main.java:73: error: class, interface, enum, or record expected
    while(t--)
    ^
Main.java:76: error: class, interface, enum, or record expected
    }
    ^
Main.java:79: error: class, interface, enum, or record expected
}
^
44 errors