/**
 * This function takes in two lists of species and returns a list of common species between them.
 *
 * @param speciesList1 A list of species names.
 * @param speciesList2 A list of species names.
 * @return A list of common species between speciesList1 and speciesList2.
 */
fun findCommonSpecies(speciesList1: List<String>, speciesList2: List<String>): List<String> {

    val commonSpecies = mutableListOf<String>()

    // Task 1: Iterate over each species in speciesList1
    for (species1 in speciesList1) {

        // Task 2: Iterate over each species in speciesList2
        for (species2 in speciesList2) {

            // Task 3: Check if the current species from speciesList2 is the same as the current species from speciesList1
            if (species2 == species1) {

                // Task 4: Add the common species to the commonSpecies list
                commonSpecies.add(species1)
            }
        }
    }

    return commonSpecies
}
/**
 * This function takes in two lists of species and returns a list of common species between them.
 *
 * @param speciesList1 A list of species names.
 * @param speciesList2 A list of species names.
 * @return A list of common species between speciesList1 and speciesList2.
 */
fun findCommonSpecies(speciesList1: List<String>, speciesList2: List<String>): List<String> {
/**
 * This function takes in two lists of species and returns a list of common species between them.
 *
 * @param speciesList1 A list of species names.
 * @param speciesList2 A list of species names.
 * @return A list of common species between speciesList1 and speciesList2.
 */
fun findCommonSpecies(speciesList1: List<String>, speciesList2: List<String>): List<String> {

    val commonSpecies = mutableListOf<String>()

    // Task 1: Iterate over each species in speciesList1
    for (species1 in speciesList1) {

        // Task 2: Iterate over each species in speciesList2
        for (species2 in speciesList2) {

            // Task 3: Check if the current species from speciesList2 is the same as the current species from speciesList1
            if (species2 == species1) {

                // Task 4: Add the common species to the commonSpecies list
                commonSpecies.add(species1)
            }
        }
    }

    return commonSpecies
}