/**
 * Given an actor's name and a list of movies, find the first movie in which the actor appeared.
 *
 * @param actorName The name of the actor.
 * @param movieList A list of movies.
 * @return The first movie in which the actor appeared, or null if the actor doesn't appear in any of the movies.
 */
fun findFirstMovie(actorName: String, movieList: List<Map<String, Any>>): String? {

    for (movie in movieList) {
        for (character in movie["characters"] as List<Map<String, Any>>) {
            if (character["actor"] == actorName) {
                return movie["title"] as String
            }
        }
    }
    return null
}
/**
 * Given an actor's name and a list of movies, find the first movie in which the actor appeared.
 *
 * @param actorName The name of the actor.
 * @param movieList A list of movies.
 * @return The first movie in which the actor appeared, or null if the actor doesn't appear in any of the movies.
 */
fun findFirstMovie(actorName: String, movieList: List<Map<String, Any>>): String? {
/**
 * Given an actor's name and a list of movies, find the first movie in which the actor appeared.
 *
 * @param actorName The name of the actor.
 * @param movieList A list of movies.
 * @return The first movie in which the actor appeared, or null if the actor doesn't appear in any of the movies.
 */
fun findFirstMovie(actorName: String, movieList: List<Map<String, Any>>): String? {

    for (movie in movieList) {
        for (character in movie["characters"] as List<Map<String, Any>>) {
            if (character["actor"] == actorName) {
                return movie["title"] as String
            }
        }
    }
    return null
}