while str=gets
    a=Array.new(13,0)
    str.split(",").each do |b|
        a[b.to_i-1]+=1
        end
    str=a.join
    a.delete(0)
    a.sort!
    case a
        when [1,1,1,1,1]
        puts "straight" if (str=~/1{5}/)||(str=~/10{8}1{4}/)
        when [1,1,1,2]
            puts "one pair"
        when [1,2,2]
            puts "two pair"
        when [1,1,3]
            puts "three card"
        when [2,3]
            puts "full house"
        when [1,4]
            puts "four card"
        else
            puts "null"
    end
end