/**
 * Chef [chefName] had a mishap in the kitchen and burned some vegetables.
 * Your task is to find out which vegetables are burned and remove them from the dish.
 * Use nested loops and the 'continue' keyword to complete this task.
 *
 * @param chefName The name of the chef.
 * @param vegetables A list of vegetables in the dish.
 * @return The updated list of vegetables with the burned ones removed.
 */
fun checkBurnedVegetables(chefName: String, vegetables: MutableList<String>): MutableList<String> {

    val burnedVegetables = mutableListOf<String>()
    
    println("Chef $chefName is checking for burned vegetables...")
    
    for (vegetable in vegetables.toList()) {
        for (char in vegetable) {
            if (char == 'b') {
                burnedVegetables.add(vegetable)
                println("$vegetable is burned! Removing from the dish...")
                continue
            }
        }
    }
    
    burnedVegetables.forEach { vegetables.remove(it) }
    
    println("\nChef $chefName removed all the burned vegetables.")
    
    return vegetables
}

// Example usage
/**
 * Chef [chefName] had a mishap in the kitchen and burned some vegetables.
 * Your task is to find out which vegetables are burned and remove them from the dish.
 * Use nested loops and the 'continue' keyword to complete this task.
 *
 * @param chefName The name of the chef.
 * @param vegetables A list of vegetables in the dish.
 * @return The updated list of vegetables with the burned ones removed.
 */
fun checkBurnedVegetables(chefName: String, vegetables: MutableList<String>): MutableList<String> {
/**
 * Chef [chefName] had a mishap in the kitchen and burned some vegetables.
 * Your task is to find out which vegetables are burned and remove them from the dish.
 * Use nested loops and the 'continue' keyword to complete this task.
 *
 * @param chefName The name of the chef.
 * @param vegetables A list of vegetables in the dish.
 * @return The updated list of vegetables with the burned ones removed.
 */
fun checkBurnedVegetables(chefName: String, vegetables: MutableList<String>): MutableList<String> {

    val burnedVegetables = mutableListOf<String>()
    
    println("Chef $chefName is checking for burned vegetables...")
    
    for (vegetable in vegetables.toList()) {
        for (char in vegetable) {
            if (char == 'b') {
                burnedVegetables.add(vegetable)
                println("$vegetable is burned! Removing from the dish...")
                continue
            }
        }
    }
    
    burnedVegetables.forEach { vegetables.remove(it) }
    
    println("\nChef $chefName removed all the burned vegetables.")
    
    return vegetables
}

// Example usage