/**
 * Find the most experienced firefighter from the given list.
 *
 * @param firefighters A list of tuples representing the name, age, and experience of firefighters.
 * @return A tuple consisting of the name, age, and experience of the most experienced firefighter.
 */
fun findMostExperienced(firefighters: List<Triple<String, Int, Int>>): Triple<String, Int, Int> {

    var mostExperienced = Triple("", 0, 0)
    for (firefighter in firefighters) {
        val (name, age, experience) = firefighter
        if (experience > mostExperienced.third) {
            mostExperienced = firefighter
        }
    }
    return mostExperienced
}
/**
 * Find the most experienced firefighter from the given list.
 *
 * @param firefighters A list of tuples representing the name, age, and experience of firefighters.
 * @return A tuple consisting of the name, age, and experience of the most experienced firefighter.
 */
fun findMostExperienced(firefighters: List<Triple<String, Int, Int>>): Triple<String, Int, Int> {
/**
 * Find the most experienced firefighter from the given list.
 *
 * @param firefighters A list of tuples representing the name, age, and experience of firefighters.
 * @return A tuple consisting of the name, age, and experience of the most experienced firefighter.
 */
fun findMostExperienced(firefighters: List<Triple<String, Int, Int>>): Triple<String, Int, Int> {

    var mostExperienced = Triple("", 0, 0)
    for (firefighter in firefighters) {
        val (name, age, experience) = firefighter
        if (experience > mostExperienced.third) {
            mostExperienced = firefighter
        }
    }
    return mostExperienced
}