/**
 * Given a set of animals in the farmer's inventory and a set of animals on the farm,
 * return a set of animals that have managed to break out of the farm.
 */
fun findStrayAnimals(farmerInventory: Set<String>, farmAnimals: Set<String>): Set<String> {

    val escapedAnimals = mutableSetOf<String>() // Create an empty set to store escaped animals

    // Iterate over all animals in the farmer's inventory
    for (animal in farmerInventory) {
        // Check if the animal is not present on the farm
        if (animal !in farmAnimals) {
            escapedAnimals.add(animal) // Add the escaped animal to the set
        }
    }

    return escapedAnimals
}
/**
 * Given a set of animals in the farmer's inventory and a set of animals on the farm,
 * return a set of animals that have managed to break out of the farm.
 */
fun findStrayAnimals(farmerInventory: Set<String>, farmAnimals: Set<String>): Set<String> {
/**
 * Given a set of animals in the farmer's inventory and a set of animals on the farm,
 * return a set of animals that have managed to break out of the farm.
 */
fun findStrayAnimals(farmerInventory: Set<String>, farmAnimals: Set<String>): Set<String> {

    val escapedAnimals = mutableSetOf<String>() // Create an empty set to store escaped animals

    // Iterate over all animals in the farmer's inventory
    for (animal in farmerInventory) {
        // Check if the animal is not present on the farm
        if (animal !in farmAnimals) {
            escapedAnimals.add(animal) // Add the escaped animal to the set
        }
    }

    return escapedAnimals
}