/**
 * Given the location and intensity of fire, extinguish it using water buckets
 */
fun extinguishFire(fireLocation: String, fireIntensity: Int) {

    val waterBuckets = 5
    val temperatureThreshold = 500

    if (fireIntensity > temperatureThreshold) {
        println("Fire is too intense! Call for backup and evacuate the area.")
    } else {
        for (bucket in 0 until waterBuckets) {
            when (fireLocation) {
                "left" -> {
                    // Add code to extinguish fire on the left side using a water bucket
                    println("Extinguishing fire on the left side with water bucket: ${bucket + 1}")
                }
                "right" -> {
                    // Add code to extinguish fire on the right side using a water bucket
                    println("Extinguishing fire on the right side with water bucket: ${bucket + 1}")
                }
                "center" -> {
                    // Add code to extinguish fire in the center using a water bucket
                    println("Extinguishing fire in the center with water bucket: ${bucket + 1}")
                }
                else -> {
                    // Add code to extinguish fire on an unknown location using a water bucket
                    println("Extinguishing fire on unknown location with water bucket: ${bucket + 1}")
                }
            }
        }
    }
}
/**
 * Given the location and intensity of fire, extinguish it using water buckets
 */
fun extinguishFire(fireLocation: String, fireIntensity: Int) {
/**
 * Given the location and intensity of fire, extinguish it using water buckets
 */
fun extinguishFire(fireLocation: String, fireIntensity: Int) {

    val waterBuckets = 5
    val temperatureThreshold = 500

    if (fireIntensity > temperatureThreshold) {
        println("Fire is too intense! Call for backup and evacuate the area.")
    } else {
        for (bucket in 0 until waterBuckets) {
            when (fireLocation) {
                "left" -> {
                    // Add code to extinguish fire on the left side using a water bucket
                    println("Extinguishing fire on the left side with water bucket: ${bucket + 1}")
                }
                "right" -> {
                    // Add code to extinguish fire on the right side using a water bucket
                    println("Extinguishing fire on the right side with water bucket: ${bucket + 1}")
                }
                "center" -> {
                    // Add code to extinguish fire in the center using a water bucket
                    println("Extinguishing fire in the center with water bucket: ${bucket + 1}")
                }
                else -> {
                    // Add code to extinguish fire on an unknown location using a water bucket
                    println("Extinguishing fire on unknown location with water bucket: ${bucket + 1}")
                }
            }
        }
    }
}