#include<stdio.h>
#include<string.h>

int main()
{
    char N[1001];
    gets(N);

    char last = N[strlen(N)-1];
    printf("Last digit: %c", last);

    printf("\n");
    if(last == 2 || last == 4 || last == 5 || last == 7 || last == 9) {
        printf("hon");
    }
    else if(last == 0 || last == 1 || last == 6 || last == 8) {
        printf("pon");
    }
    else {
        printf("bon");
    }
    return 0;
}
