straights = [[1,2,3,4,5], [2,3,4,4,6], [3,4,5,6,7], [4,5,6,7,8], [5,6,7,8,9], [6,7,8,9,10], [7,8,9,10,11], [8,9,10,11,12], [9,10,11,12,13], [1,10,11,12,13]]
while line = gets
    cards = line.chomp.split(',').map(&:to_i).sort
    uniq = cards.uniq
    maxcount = 0
    uniq.each{|x| maxcount = cards.count(x) if maxcount < cards.count(x)}

    result = "null"
    if uniq.length == 2
        if maxcount == 4
            result = "four card"
        else
            result = "full house"
        end
    elsif 
        if straights.any?{|arr| arr == cards}
            result = "straight"
        end
    elsif uniq.length == 3
        if maxcount == 3
            result = "three card"
        else
            result = "two pair"
        end
    elsif uniq.length == 4
        result = "one pair"
    end
    puts result
end
