/**
 * This exercise requires the firefighter to iterate over a sequence of buildings and use nested if statements to
 * extinguish fires based on certain conditions.
 *
 * @param buildings A list containing the names of buildings and whether they are on fire or not.
 * @param firefighter The name of the firefighter.
 */
fun extinguishFire(buildings: List<String>, firefighter: String) {

    for (building in buildings) {
        if ("fire" in building) {
            println("$firefighter is approaching $building...")
            // YOUR CODE HERE: Put your code to handle the nested if statements to extinguish the fire in each building.
            // Remember to consider different conditions such as the type of fire, the intensity, etc.
            if ("forest" in building) {
                println("$building fire is spreading rapidly!")
                println("$firefighter requests backup from other firefighters.")
                
                // YOUR CODE HERE: Implement the nested if statements to call other firefighters based on the location and intensity of fire.
                
                println("Backup firefighters have arrived!")
                
                // YOUR CODE HERE: Write the code to extinguish the fire in the forest using specialized equipment.
            }
        }
    }
}
/**
 * This exercise requires the firefighter to iterate over a sequence of buildings and use nested if statements to
 * extinguish fires based on certain conditions.
 *
 * @param buildings A list containing the names of buildings and whether they are on fire or not.
 * @param firefighter The name of the firefighter.
 */
fun extinguishFire(buildings: List<String>, firefighter: String) {
/**
 * This exercise requires the firefighter to iterate over a sequence of buildings and use nested if statements to
 * extinguish fires based on certain conditions.
 *
 * @param buildings A list containing the names of buildings and whether they are on fire or not.
 * @param firefighter The name of the firefighter.
 */
fun extinguishFire(buildings: List<String>, firefighter: String) {

    for (building in buildings) {
        if ("fire" in building) {
            println("$firefighter is approaching $building...")
            // YOUR CODE HERE: Put your code to handle the nested if statements to extinguish the fire in each building.
            // Remember to consider different conditions such as the type of fire, the intensity, etc.
            if ("forest" in building) {
                println("$building fire is spreading rapidly!")
                println("$firefighter requests backup from other firefighters.")
                
                // YOUR CODE HERE: Implement the nested if statements to call other firefighters based on the location and intensity of fire.
                
                println("Backup firefighters have arrived!")
                
                // YOUR CODE HERE: Write the code to extinguish the fire in the forest using specialized equipment.
            }
        }
    }
}