/**
 * Given a list of animals and a list of wild animals, this function takes each animal from the animals list and checks if it is also present in the wild animals list.
 * The function returns the first wild animal found, or null if no wild animal is found.
 *
 * @param animals A list of animals (strings).
 * @param wildAnimals A list of wild animals (strings).
 * @return The first wild animal found (string) or null if no wild animal is found.
 */
fun findWildAnimal(animals: List<String>, wildAnimals: List<String>): String? {

    for (animal in animals) {
        for (wildAnimal in wildAnimals) {
            if (animal == wildAnimal) {
                return wildAnimal
            }
        }
    }
    return null
}
/**
 * Given a list of animals and a list of wild animals, this function takes each animal from the animals list and checks if it is also present in the wild animals list.
 * The function returns the first wild animal found, or null if no wild animal is found.
 *
 * @param animals A list of animals (strings).
 * @param wildAnimals A list of wild animals (strings).
 * @return The first wild animal found (string) or null if no wild animal is found.
 */
fun findWildAnimal(animals: List<String>, wildAnimals: List<String>): String? {
/**
 * Given a list of animals and a list of wild animals, this function takes each animal from the animals list and checks if it is also present in the wild animals list.
 * The function returns the first wild animal found, or null if no wild animal is found.
 *
 * @param animals A list of animals (strings).
 * @param wildAnimals A list of wild animals (strings).
 * @return The first wild animal found (string) or null if no wild animal is found.
 */
fun findWildAnimal(animals: List<String>, wildAnimals: List<String>): String? {

    for (animal in animals) {
        for (wildAnimal in wildAnimals) {
            if (animal == wildAnimal) {
                return wildAnimal
            }
        }
    }
    return null
}