const UNIT_DEF = {
  hon: [2, 4, 5, 7, 9],
  pon: [0, 1, 6, 8],
  bon: [3]
};

process.stdin.resume();
process.stdin.setEncoding("utf8");
process.stdin.on("data", input => {
  if (input > 1000 || isNaN(input)) {
    return;
  }
  const ichinokurai = input % 10;
  const result = Object.keys(UNIT_DEF).find(key =>
    UNIT_DEF[key].includes(ichinokurai)
  );
  console.log(result);
});
