/**
 * You are given two sets of movies in which two actors have acted.
 * Write a function to find the common movies between the two actors.
 *
 * @param actor1 A set containing the movies in which actor1 has acted.
 * @param actor2 A set containing the movies in which actor2 has acted.
 * @return A set containing the common movies between actor1 and actor2.
 */
fun getCommonMovies(actor1: Set<String>, actor2: Set<String>): Set<String> {

    val commonMovies = mutableSetOf<String>()

    // Iterate through each movie in actor1's set of movies
    for (movie1 in actor1) {
        // Iterate through each movie in actor2's set of movies
        for (movie2 in actor2) {
            if (movie1 == movie2) {
                // If a common movie is found, add it to the set of commonMovies
                commonMovies.add(movie1)
            }
        }
    }

    return commonMovies
}
/**
 * You are given two sets of movies in which two actors have acted.
 * Write a function to find the common movies between the two actors.
 *
 * @param actor1 A set containing the movies in which actor1 has acted.
 * @param actor2 A set containing the movies in which actor2 has acted.
 * @return A set containing the common movies between actor1 and actor2.
 */
fun getCommonMovies(actor1: Set<String>, actor2: Set<String>): Set<String> {
/**
 * You are given two sets of movies in which two actors have acted.
 * Write a function to find the common movies between the two actors.
 *
 * @param actor1 A set containing the movies in which actor1 has acted.
 * @param actor2 A set containing the movies in which actor2 has acted.
 * @return A set containing the common movies between actor1 and actor2.
 */
fun getCommonMovies(actor1: Set<String>, actor2: Set<String>): Set<String> {

    val commonMovies = mutableSetOf<String>()

    // Iterate through each movie in actor1's set of movies
    for (movie1 in actor1) {
        // Iterate through each movie in actor2's set of movies
        for (movie2 in actor2) {
            if (movie1 == movie2) {
                // If a common movie is found, add it to the set of commonMovies
                commonMovies.add(movie1)
            }
        }
    }

    return commonMovies
}