import std.stdio,std.string,std.conv,std.algorithm,std.array;

void main(){
    while(true){
        auto cards=readln.chomp.split(",").map!(to!int).array;
        if(!cards.length)break;
        cards.sort.yaku.writeln;
    }
}

string yaku(int[] c){
    if(c[0]==c[1]&&c[1]==c[2]&&c[2]==c[3]||c[1]==c[2]&&c[2]==c[3]&&c[3]==c[4]){
        return "four card";
    }else if(c[0]==c[1]&&c[1]==c[2]&&c[3]==c[4]||c[0]==c[1]&&c[2]==c[3]&&c[3]==c[4]){
        return "full house";
    }else if(c[0]==1&&c[1]==10&&c[2]==11&&c[3]==12&&c[4]==13||c[1]==c[0]+1&&c[2]==c[0]+2&&c[3]==c[0]+3&&c[4]==c[0]+4){
        return "straight";
    }else if(c[0]==c[1]&&c[1]==c[2]||c[1]==c[2]&&c[2]==c[3]||c[2]==c[3]&&c[3]==c[4]){
        return "three card";
    }else if(c[0]==c[1]&&c[2]==c[3]||c[0]==c[1]&&c[3]==c[4]||c[1]==c[2]&&c[3]==c[4]){
        return "two pair";
    }else if(c[0]==c[1]||c[1]==c[2]||c[2]==c[3]||c[3]==c[4]){
        return "one pair";
    }else{
        return "null";
    }
}