/**
 * Given a nested dictionary that represents graphics tags, find the common tags across all graphic designs.
 *
 * @param graphicsDictionary A nested dictionary containing graphic design information.
 * @return A list of common tags present in all graphic designs.
 */
fun findCommonTags(graphicsDictionary: Map<String, Map<String, List<String>>>): List<String> {

    // Initialize the common tags variable as an empty set
    val commonTags = mutableSetOf<String>()

    // Iterate over each graphic design
    for (graphicDesign in graphicsDictionary.values) {
        // If commonTags is empty, add all the tags from the first graphic design
        if (commonTags.isEmpty()) {
            commonTags.addAll(graphicDesign["tags"]!!)
        } else {
            // Find the intersection of current commonTags and the tags of the current graphic design
            commonTags.retainAll(graphicDesign["tags"]!!)
        }
    }

    // Return the common tags as a list
    return commonTags.toList()
}
/**
 * Given a nested dictionary that represents graphics tags, find the common tags across all graphic designs.
 *
 * @param graphicsDictionary A nested dictionary containing graphic design information.
 * @return A list of common tags present in all graphic designs.
 */
fun findCommonTags(graphicsDictionary: Map<String, Map<String, List<String>>>): List<String> {
/**
 * Given a nested dictionary that represents graphics tags, find the common tags across all graphic designs.
 *
 * @param graphicsDictionary A nested dictionary containing graphic design information.
 * @return A list of common tags present in all graphic designs.
 */
fun findCommonTags(graphicsDictionary: Map<String, Map<String, List<String>>>): List<String> {

    // Initialize the common tags variable as an empty set
    val commonTags = mutableSetOf<String>()

    // Iterate over each graphic design
    for (graphicDesign in graphicsDictionary.values) {
        // If commonTags is empty, add all the tags from the first graphic design
        if (commonTags.isEmpty()) {
            commonTags.addAll(graphicDesign["tags"]!!)
        } else {
            // Find the intersection of current commonTags and the tags of the current graphic design
            commonTags.retainAll(graphicDesign["tags"]!!)
        }
    }

    // Return the common tags as a list
    return commonTags.toList()
}