/**
 * A farmer needs to breed cows on his farm. Each cow has a tuple of qualities (name, age, weight).
 * However, the farmer wants to exclude any cow that has an age greater than 4 or a weight lower than 500 kg.
 * Write a function to breed only the eligible cows and return a list of their names.
 */
fun breedCows(farm: List<Triple<String, Int, Int>>): List<String> {

    val eligibleCows = mutableListOf<String>()

    for (cow in farm) {
        val (name, age, weight) = cow

        if (age > 4 || weight < 500) {
            continue
        }

        eligibleCows.add(name)
    }

    return eligibleCows
}
/**
 * A farmer needs to breed cows on his farm. Each cow has a tuple of qualities (name, age, weight).
 * However, the farmer wants to exclude any cow that has an age greater than 4 or a weight lower than 500 kg.
 * Write a function to breed only the eligible cows and return a list of their names.
 */
fun breedCows(farm: List<Triple<String, Int, Int>>): List<String> {
/**
 * A farmer needs to breed cows on his farm. Each cow has a tuple of qualities (name, age, weight).
 * However, the farmer wants to exclude any cow that has an age greater than 4 or a weight lower than 500 kg.
 * Write a function to breed only the eligible cows and return a list of their names.
 */
fun breedCows(farm: List<Triple<String, Int, Int>>): List<String> {

    val eligibleCows = mutableListOf<String>()

    for (cow in farm) {
        val (name, age, weight) = cow

        if (age > 4 || weight < 500) {
            continue
        }

        eligibleCows.add(name)
    }

    return eligibleCows
}