/**
 * Given two actors/actresses and a list of movies,
 * this function returns a set of movies in which
 * both actors/actresses have appeared together.
 */
fun findCommonMovies(actor1: String, actor2: String, movies: List<String>): Set<String> {

    val commonMovies = mutableSetOf<String>()

    // Loop through each movie in the list
    for (movie in movies) {
        // Check if both actors have appeared in the movie
        if (actor1 in movie && actor2 in movie) {
            commonMovies.add(movie)
        }
    }

    return commonMovies
}
/**
 * Given two actors/actresses and a list of movies,
 * this function returns a set of movies in which
 * both actors/actresses have appeared together.
 */
fun findCommonMovies(actor1: String, actor2: String, movies: List<String>): Set<String> {
/**
 * Given two actors/actresses and a list of movies,
 * this function returns a set of movies in which
 * both actors/actresses have appeared together.
 */
fun findCommonMovies(actor1: String, actor2: String, movies: List<String>): Set<String> {

    val commonMovies = mutableSetOf<String>()

    // Loop through each movie in the list
    for (movie in movies) {
        // Check if both actors have appeared in the movie
        if (actor1 in movie && actor2 in movie) {
            commonMovies.add(movie)
        }
    }

    return commonMovies
}