/**
 * This function takes a dictionary of firefighters and a list of hazards as arguments.
 * It should return the names of the firefighters who are not assigned to any of the hazards.
 */
fun firefighterOperations(firefighters: Map<String, List<String>>, hazards: List<String>): List<String> {

    // Create an empty list to store the unassigned firefighters
    val unassignedFirefighters = mutableListOf<String>()

    // Iterate over each firefighter in the dictionary
    for (firefighter in firefighters.keys) {
        // Create a flag variable to determine if the firefighter is assigned
        var assigned = false

        // Iterate over each hazard in the list
        for (hazard in hazards) {
            // Check if the firefighter is assigned to the hazard
            if (firefighter in firefighters[hazard] ?: emptyList()) {
                // Set the assigned flag variable to true
                assigned = true
                // Break out of the inner loop since the firefighter is already assigned to a hazard
                break
            }
        }

        // Check if the assigned flag variable is still false
        if (!assigned) {
            // Append the name of the firefighter to the list of unassigned firefighters
            unassignedFirefighters.add(firefighter)
        }
    }

    return unassignedFirefighters
}
/**
 * This function takes a dictionary of firefighters and a list of hazards as arguments.
 * It should return the names of the firefighters who are not assigned to any of the hazards.
 */
fun firefighterOperations(firefighters: Map<String, List<String>>, hazards: List<String>): List<String> {
/**
 * This function takes a dictionary of firefighters and a list of hazards as arguments.
 * It should return the names of the firefighters who are not assigned to any of the hazards.
 */
fun firefighterOperations(firefighters: Map<String, List<String>>, hazards: List<String>): List<String> {

    // Create an empty list to store the unassigned firefighters
    val unassignedFirefighters = mutableListOf<String>()

    // Iterate over each firefighter in the dictionary
    for (firefighter in firefighters.keys) {
        // Create a flag variable to determine if the firefighter is assigned
        var assigned = false

        // Iterate over each hazard in the list
        for (hazard in hazards) {
            // Check if the firefighter is assigned to the hazard
            if (firefighter in firefighters[hazard] ?: emptyList()) {
                // Set the assigned flag variable to true
                assigned = true
                // Break out of the inner loop since the firefighter is already assigned to a hazard
                break
            }
        }

        // Check if the assigned flag variable is still false
        if (!assigned) {
            // Append the name of the firefighter to the list of unassigned firefighters
            unassignedFirefighters.add(firefighter)
        }
    }

    return unassignedFirefighters
}