#include <stdio.h>

#define ACE 14
int is4card(int cnt[]);
int isFullHouse(int cnt[]);
int isStraight(int cnt[]);
int is3card(int cnt[]);
int is2pair(int cnt[]);
int is1pair(int cnt[]);

int main(void){
    int c[5];
    int count[ACE+1];
    
    while (scanf("%d,%d,%d,%d,%d", c+0, c+1, c+2, c+3, c+4) != EOF){
        for (int i=2; i<=ACE; i++) count[i]=0;
        for (int i=0; i<5; i++){
            if (c[i]==1) c[i]=ACE;
            count[c[i]]++;
        }
        for (int i=2; i<=ACE; i++) printf("%d ",count[i]);
        printf("\n");
        
        if (is4card(count)) printf("four card\n");
        else if (isFullHouse(count)) printf("full house\n");
        else if (isStraight(count)) printf("straight\n");
        else if (is3card(count)) printf("three card\n");
        else if (is2pair(count)) printf("two pair\n");
        else if (is1pair(count)) printf("one pair\n");
        else printf("null\n");
    }
    return 0;
}

int is4card(int cnt[]){
    for (int i=2; i<=ACE; i++){
        if (cnt[i] == 4) return 1;
    }
    return 0;
}

int isFullHouse(int cnt[]){
    return is3card(cnt) && is1pair(cnt);
}

int isStraight(int cnt[]){
    int len=0;
    
    for (int i=2; i<=ACE; i++){
        if (cnt[i]==0) len=0;
        else {
            len++;
            if (len==5) return 1;
        }
    }
    return 0;
}

int is3card(int cnt[]){
    for (int i=2; i<=ACE; i++){
        if (cnt[i] == 3) return 1;
    }
    return 0;
}

int is2pair(int cnt[]){
    int i,j;
    // find the first pair
    for (i=2; i<=ACE; i++){
        if (cnt[i] == 2) break;
    }
    if (i>ACE) return 0;
    // find second pair
    for (j=2; j<=ACE; j++){
        if (i==j) continue;
        if (cnt[j] == 2) return 1;
    }
    return 0;
}

int is1pair(int cnt[]){
    for (int i=2; i<=ACE; i++){
        if (cnt[i] == 2) return 1;
    }
    return 0;
}