/**
 * This exercise aims to test your knowledge of looping statements and using nested dictionaries with loops. You will be given a dictionary that contains the skills of different graphic designers. Your task is to find the intersection of common skills among all graphic designers.
 *
 * @param graphicDesigners A dictionary containing the skills of different graphic designers. The keys represent the designer names and the values represent their skills.
 * @return A list containing the skills that are common to all graphic designers.
 */
fun graphicDesignerSkills(graphicDesigners: Map<String, List<String>>): List<String> {

    // Initialize a set with the skills of the first graphic designer
    var commonSkills = graphicDesigners.values.first().toSet()

    // Loop through the remaining designers' skills
    for ((_, skills) in graphicDesigners) {
        // Update the commonSkills set with the intersection of the current designer's skills and the existing common skills
        commonSkills = commonSkills.intersect(skills).toSet()
    }

    // Convert the set of common skills to a sorted list
    return commonSkills.sorted()
}
/**
 * This exercise aims to test your knowledge of looping statements and using nested dictionaries with loops. You will be given a dictionary that contains the skills of different graphic designers. Your task is to find the intersection of common skills among all graphic designers.
 *
 * @param graphicDesigners A dictionary containing the skills of different graphic designers. The keys represent the designer names and the values represent their skills.
 * @return A list containing the skills that are common to all graphic designers.
 */
fun graphicDesignerSkills(graphicDesigners: Map<String, List<String>>): List<String> {
/**
 * This exercise aims to test your knowledge of looping statements and using nested dictionaries with loops. You will be given a dictionary that contains the skills of different graphic designers. Your task is to find the intersection of common skills among all graphic designers.
 *
 * @param graphicDesigners A dictionary containing the skills of different graphic designers. The keys represent the designer names and the values represent their skills.
 * @return A list containing the skills that are common to all graphic designers.
 */
fun graphicDesignerSkills(graphicDesigners: Map<String, List<String>>): List<String> {

    // Initialize a set with the skills of the first graphic designer
    var commonSkills = graphicDesigners.values.first().toSet()

    // Loop through the remaining designers' skills
    for ((_, skills) in graphicDesigners) {
        // Update the commonSkills set with the intersection of the current designer's skills and the existing common skills
        commonSkills = commonSkills.intersect(skills).toSet()
    }

    // Convert the set of common skills to a sorted list
    return commonSkills.sorted()
}