/**
 * This function takes in a dictionary of actor data and returns a set of unique coactors of a given actor.
 */
fun getUniqueCoactors(actorData: Map<String, Map<String, Set<String>>>): Set<String> {

    val uniqueCoactors = mutableSetOf<String>()

    // Iterate over each actor in the dictionary
    for ((actor, movies) in actorData) {
        // Iterate over each movie of the current actor
        for ((_, coactors) in movies) {
            uniqueCoactors.addAll(coactors)
        }
    }

    return uniqueCoactors
}
/**
 * This function takes in a dictionary of actor data and returns a set of unique coactors of a given actor.
 */
fun getUniqueCoactors(actorData: Map<String, Map<String, Set<String>>>): Set<String> {
/**
 * This function takes in a dictionary of actor data and returns a set of unique coactors of a given actor.
 */
fun getUniqueCoactors(actorData: Map<String, Map<String, Set<String>>>): Set<String> {

    val uniqueCoactors = mutableSetOf<String>()

    // Iterate over each actor in the dictionary
    for ((actor, movies) in actorData) {
        // Iterate over each movie of the current actor
        for ((_, coactors) in movies) {
            uniqueCoactors.addAll(coactors)
        }
    }

    return uniqueCoactors
}