/**
 * This function takes a list of graphic designers as input and returns a set of their unique skills.
 *
 * @param graphicDesigners A list of graphic designers.
 * @return A set of unique skills possessed by the graphic designers.
 */
fun listMethodAndIterating(graphicDesigners: List<String>): Set<String> {

    val uniqueSkills = mutableSetOf<String>()

    for (designer in graphicDesigners) {
        // Convert the designer's name to lowercase and split it into a list of words
        val nameParts = designer.toLowerCase().split(" ")

        // Iterate over the list of words and check for skills in the designer's name
        for (word in nameParts) {
            // Ignore common words like "and", "the", "with"
            if (word !in listOf("and", "the", "with")) {
                // Remove any punctuation characters
                val skill = word.filter { it.isLetter() }
                uniqueSkills.add(skill)
            }
        }
    }

    return uniqueSkills
}
/**
 * This function takes a list of graphic designers as input and returns a set of their unique skills.
 *
 * @param graphicDesigners A list of graphic designers.
 * @return A set of unique skills possessed by the graphic designers.
 */
fun listMethodAndIterating(graphicDesigners: List<String>): Set<String> {
/**
 * This function takes a list of graphic designers as input and returns a set of their unique skills.
 *
 * @param graphicDesigners A list of graphic designers.
 * @return A set of unique skills possessed by the graphic designers.
 */
fun listMethodAndIterating(graphicDesigners: List<String>): Set<String> {

    val uniqueSkills = mutableSetOf<String>()

    for (designer in graphicDesigners) {
        // Convert the designer's name to lowercase and split it into a list of words
        val nameParts = designer.toLowerCase().split(" ")

        // Iterate over the list of words and check for skills in the designer's name
        for (word in nameParts) {
            // Ignore common words like "and", "the", "with"
            if (word !in listOf("and", "the", "with")) {
                // Remove any punctuation characters
                val skill = word.filter { it.isLetter() }
                uniqueSkills.add(skill)
            }
        }
    }

    return uniqueSkills
}