/**
 * Given a dictionary of designs where each design is represented by a dictionary of colors used,
 * find the common colors used in all the designs and return them as a list.
 *
 * @param designs A dictionary of designs where each design is represented by a dictionary of colors.
 * @return A list of common colors used in all the designs.
 */
fun findCommonColors(designs: Map<String, Map<String, String>>): List<String> {

    val commonColors = mutableSetOf<String>()

    // Iterate over each design
    for (design in designs.values) {

        // Iterate over each color in the current design
        for (color in design.values) {

            // Check if the color is present in all other designs
            if (designs.values.all { otherDesign -> color in otherDesign.values }) {

                // Add the color to the set of common colors
                commonColors.add(color)
            }
        }
    }

    return commonColors.toList()
}
/**
 * Given a dictionary of designs where each design is represented by a dictionary of colors used,
 * find the common colors used in all the designs and return them as a list.
 *
 * @param designs A dictionary of designs where each design is represented by a dictionary of colors.
 * @return A list of common colors used in all the designs.
 */
fun findCommonColors(designs: Map<String, Map<String, String>>): List<String> {
/**
 * Given a dictionary of designs where each design is represented by a dictionary of colors used,
 * find the common colors used in all the designs and return them as a list.
 *
 * @param designs A dictionary of designs where each design is represented by a dictionary of colors.
 * @return A list of common colors used in all the designs.
 */
fun findCommonColors(designs: Map<String, Map<String, String>>): List<String> {

    val commonColors = mutableSetOf<String>()

    // Iterate over each design
    for (design in designs.values) {

        // Iterate over each color in the current design
        for (color in design.values) {

            // Check if the color is present in all other designs
            if (designs.values.all { otherDesign -> color in otherDesign.values }) {

                // Add the color to the set of common colors
                commonColors.add(color)
            }
        }
    }

    return commonColors.toList()
}