/**
 * This function receives a list of pets and treats them according to their condition.
 */
fun treatPets(pets: List<Pet>): List<Pet> {

    for (pet in pets) {
        pet.treatment = when (pet.condition) {
            "healthy" -> "check-up"
            "sick" -> "medication"
            "injured" -> "surgery"
            "terminal" -> "pain management"
            else -> "unknown"
        }
    }
    return pets
}

data class Pet(val name: String, var condition: String, var treatment: String = "")
/**
 * This function receives a list of pets and treats them according to their condition.
 */
fun treatPets(pets: List<Pet>): List<Pet> {
/**
 * This function receives a list of pets and treats them according to their condition.
 */
fun treatPets(pets: List<Pet>): List<Pet> {

    for (pet in pets) {
        pet.treatment = when (pet.condition) {
            "healthy" -> "check-up"
            "sick" -> "medication"
            "injured" -> "surgery"
            "terminal" -> "pain management"
            else -> "unknown"
        }
    }
    return pets
}

data class Pet(val name: String, var condition: String, var treatment: String = "")