/**
 * Chef Specialty:
 *
 * This function takes a chef's name, a map of ingredients, and a menu. It checks if the chef
 * can prepare any of the dishes in the menu based on the availability of ingredients. If the chef
 * can prepare a dish, it returns the name of the dish. If not, it returns "No dish can be prepared".
 *
 * @param chefName The name of the chef.
 * @param ingredients A map of ingredients where the keys are ingredient names and the values
 *                    are the quantities available.
 * @param menu A map where the keys are dish names and the values are lists of required
 *             ingredients for each dish.
 * @return The name of the dish that the chef can prepare, or "No dish can be prepared".
 */
fun chefSpecialty(chefName: String, ingredients: Map<String, Int>, menu: Map<String, Map<String, Int>>): String {

    for ((dish, requiredIngredients) in menu) {
        var canPrepare = true

        for ((ingredient, quantity) in requiredIngredients) {
            if (!ingredients.containsKey(ingredient) || ingredients[ingredient]!! < quantity) {
                canPrepare = false
                break
            }
        }

        if (canPrepare) {
            return dish
        }
    }

    return "No dish can be prepared"
}
/**
 * Chef Specialty:
 *
 * This function takes a chef's name, a map of ingredients, and a menu. It checks if the chef
 * can prepare any of the dishes in the menu based on the availability of ingredients. If the chef
 * can prepare a dish, it returns the name of the dish. If not, it returns "No dish can be prepared".
 *
 * @param chefName The name of the chef.
 * @param ingredients A map of ingredients where the keys are ingredient names and the values
 *                    are the quantities available.
 * @param menu A map where the keys are dish names and the values are lists of required
 *             ingredients for each dish.
 * @return The name of the dish that the chef can prepare, or "No dish can be prepared".
 */
fun chefSpecialty(chefName: String, ingredients: Map<String, Int>, menu: Map<String, Map<String, Int>>): String {
/**
 * Chef Specialty:
 *
 * This function takes a chef's name, a map of ingredients, and a menu. It checks if the chef
 * can prepare any of the dishes in the menu based on the availability of ingredients. If the chef
 * can prepare a dish, it returns the name of the dish. If not, it returns "No dish can be prepared".
 *
 * @param chefName The name of the chef.
 * @param ingredients A map of ingredients where the keys are ingredient names and the values
 *                    are the quantities available.
 * @param menu A map where the keys are dish names and the values are lists of required
 *             ingredients for each dish.
 * @return The name of the dish that the chef can prepare, or "No dish can be prepared".
 */
fun chefSpecialty(chefName: String, ingredients: Map<String, Int>, menu: Map<String, Map<String, Int>>): String {

    for ((dish, requiredIngredients) in menu) {
        var canPrepare = true

        for ((ingredient, quantity) in requiredIngredients) {
            if (!ingredients.containsKey(ingredient) || ingredients[ingredient]!! < quantity) {
                canPrepare = false
                break
            }
        }

        if (canPrepare) {
            return dish
        }
    }

    return "No dish can be prepared"
}