while gets
    cards = $_.split(',').map(&:to_i).sort
    max = cards.uniq.map{|x| cards.count x}.max
    min = cards.uniq.map{|x| cards.count x}.min

    case max
    when 4
        puts 'four card'
        next
    when 3
        if min == 2
            puts 'full house'
        else
            puts 'three card'
        end
        next
    when 1
        if (0..3).map { |i| cards[i+1] - cards[i] == 1 }.uniq == [true]
            puts 'straight'
            next
        end
        if cards == [1, 10, 11, 12, 13]
            puts 'straight'
            next
        end
    when 2
        case cards.uniq.size
        when 4
            puts 'one pair'
        when 3
            puts 'two pair'
        end
        next
    end
    puts 'null'
end