/**
 * A farmer wants to remove certain animals from his list of animals.
 *
 * @param animalsList a list of animals on the farm
 * @param unwantedAnimals a list of animals the farmer wants to remove
 * @return the updated list of animals after removing the unwanted animals
 */
fun removeUnwantedAnimals(animalsList: MutableList<String>, unwantedAnimals: List<String>): List<String> {

    for (animal in unwantedAnimals) {
        while (animal in animalsList) {
            animalsList.remove(animal)
        }
    }
    return animalsList
}

// Example usage
/**
 * A farmer wants to remove certain animals from his list of animals.
 *
 * @param animalsList a list of animals on the farm
 * @param unwantedAnimals a list of animals the farmer wants to remove
 * @return the updated list of animals after removing the unwanted animals
 */
fun removeUnwantedAnimals(animalsList: MutableList<String>, unwantedAnimals: List<String>): List<String> {
/**
 * A farmer wants to remove certain animals from his list of animals.
 *
 * @param animalsList a list of animals on the farm
 * @param unwantedAnimals a list of animals the farmer wants to remove
 * @return the updated list of animals after removing the unwanted animals
 */
fun removeUnwantedAnimals(animalsList: MutableList<String>, unwantedAnimals: List<String>): List<String> {

    for (animal in unwantedAnimals) {
        while (animal in animalsList) {
            animalsList.remove(animal)
        }
    }
    return animalsList
}

// Example usage