/**
 * This function takes in two sets of actors and returns a set containing the movies in which both actors have appeared.
 */
fun findCommonMovies(actorsSet1: Set<String>, actorsSet2: Set<String>): Set<String> {

    val commonMovies = mutableSetOf<String>()
    for (actor1 in actorsSet1) {
        for (actor2 in actorsSet2) {
            if (actor1 >= actor2) {
                commonMovies.add(actor1)
            }
        }
    }
    return commonMovies
}
/**
 * This function takes in two sets of actors and returns a set containing the movies in which both actors have appeared.
 */
fun findCommonMovies(actorsSet1: Set<String>, actorsSet2: Set<String>): Set<String> {
/**
 * This function takes in two sets of actors and returns a set containing the movies in which both actors have appeared.
 */
fun findCommonMovies(actorsSet1: Set<String>, actorsSet2: Set<String>): Set<String> {

    val commonMovies = mutableSetOf<String>()
    for (actor1 in actorsSet1) {
        for (actor2 in actorsSet2) {
            if (actor1 >= actor2) {
                commonMovies.add(actor1)
            }
        }
    }
    return commonMovies
}