/**
 * Given a dictionary of vet appointments and a new appointment, append the new appointment to the list
 * of appointments for the corresponding veterinarian. If the veterinarian does not exist in the dictionary,
 * create a new key-value pair with the veterinarian as the key and the new appointment as the value.
 *
 * @param vetAppointments A dictionary with veterinarian names as keys and lists of appointments as values
 * @param newAppointment A Pair representing the new appointment to be added
 * @return The updated dictionary with the new appointment appended to the list of appointments
 */
fun vetExercise(vetAppointments: MutableMap<String, MutableList<String>>, newAppointment: Pair<String, String>): MutableMap<String, MutableList<String>> {

    if (newAppointment.first in vetAppointments) {
        vetAppointments[newAppointment.first]?.add(newAppointment.second)
    } else {
        vetAppointments[newAppointment.first] = mutableListOf(newAppointment.second)
    }
    return vetAppointments
}

// Example usage
/**
 * Given a dictionary of vet appointments and a new appointment, append the new appointment to the list
 * of appointments for the corresponding veterinarian. If the veterinarian does not exist in the dictionary,
 * create a new key-value pair with the veterinarian as the key and the new appointment as the value.
 *
 * @param vetAppointments A dictionary with veterinarian names as keys and lists of appointments as values
 * @param newAppointment A Pair representing the new appointment to be added
 * @return The updated dictionary with the new appointment appended to the list of appointments
 */
fun vetExercise(vetAppointments: MutableMap<String, MutableList<String>>, newAppointment: Pair<String, String>): MutableMap<String, MutableList<String>> {
/**
 * Given a dictionary of vet appointments and a new appointment, append the new appointment to the list
 * of appointments for the corresponding veterinarian. If the veterinarian does not exist in the dictionary,
 * create a new key-value pair with the veterinarian as the key and the new appointment as the value.
 *
 * @param vetAppointments A dictionary with veterinarian names as keys and lists of appointments as values
 * @param newAppointment A Pair representing the new appointment to be added
 * @return The updated dictionary with the new appointment appended to the list of appointments
 */
fun vetExercise(vetAppointments: MutableMap<String, MutableList<String>>, newAppointment: Pair<String, String>): MutableMap<String, MutableList<String>> {

    if (newAppointment.first in vetAppointments) {
        vetAppointments[newAppointment.first]?.add(newAppointment.second)
    } else {
        vetAppointments[newAppointment.first] = mutableListOf(newAppointment.second)
    }
    return vetAppointments
}

// Example usage