/**
 * This function takes in the names of two actors/actresses, as well as a list of movies.
 * It returns the list of movies that both actors/actresses have worked in.
 *
 * @param actor1 Name of the first actor/actress
 * @param actor2 Name of the second actor/actress
 * @param movies List of movies
 * @return List of movies that both actors/actresses have worked in
 */
fun commonMovies(actor1: String, actor2: String, movies: List<String>): List<String> {

    val commonMovies = mutableListOf<String>()

    for (movie in movies) {
        if (actor1 in movie && actor2 in movie) {
            commonMovies.add(movie)
        }
    }

    return commonMovies
}
/**
 * This function takes in the names of two actors/actresses, as well as a list of movies.
 * It returns the list of movies that both actors/actresses have worked in.
 *
 * @param actor1 Name of the first actor/actress
 * @param actor2 Name of the second actor/actress
 * @param movies List of movies
 * @return List of movies that both actors/actresses have worked in
 */
fun commonMovies(actor1: String, actor2: String, movies: List<String>): List<String> {
/**
 * This function takes in the names of two actors/actresses, as well as a list of movies.
 * It returns the list of movies that both actors/actresses have worked in.
 *
 * @param actor1 Name of the first actor/actress
 * @param actor2 Name of the second actor/actress
 * @param movies List of movies
 * @return List of movies that both actors/actresses have worked in
 */
fun commonMovies(actor1: String, actor2: String, movies: List<String>): List<String> {

    val commonMovies = mutableListOf<String>()

    for (movie in movies) {
        if (actor1 in movie && actor2 in movie) {
            commonMovies.add(movie)
        }
    }

    return commonMovies
}