int N; // N <= 999

// 2, 4, 5, 7, 9 hon
while(N > 0){
  if(N % 10 == 2 || 4 || 5 || 7 || 9){
    Console.WriteLine("hon");
  }else if(N % 10 == 0 || 1 || 6 || 8){
    Console.WriteLine("pon");
  }else if(N % 10 == 3){
    Console.WriteLine("bon");
  }
}