/**
 * This function takes an athlete's name and a list of new activities.
 * It modifies the athlete's list of activities by concatenating the new activities at the end.
 *
 * @param athleteName The name of the athlete.
 * @param newActivities The list of new activities.
 * @return The modified list of activities for the athlete.
 */
fun modifyList(athleteName: String, newActivities: List<String>): List<String> {

    val athletes = mapOf(
        "Michael Phelps" to listOf("Swimming", "Running", "Cycling"),
        "Serena Williams" to listOf("Tennis", "Gymnastics", "Sprinting"),
        "Usain Bolt" to listOf("Running", "Basketball", "Football")
    )

    // Retrieve the list of activities for the given athlete
    val activities = athletes.getOrDefault(athleteName, emptyList()).toMutableList()

    // Concatenate the new activities at the end of the athlete's list
    activities.addAll(newActivities)

    return activities
}
/**
 * This function takes an athlete's name and a list of new activities.
 * It modifies the athlete's list of activities by concatenating the new activities at the end.
 *
 * @param athleteName The name of the athlete.
 * @param newActivities The list of new activities.
 * @return The modified list of activities for the athlete.
 */
fun modifyList(athleteName: String, newActivities: List<String>): List<String> {
/**
 * This function takes an athlete's name and a list of new activities.
 * It modifies the athlete's list of activities by concatenating the new activities at the end.
 *
 * @param athleteName The name of the athlete.
 * @param newActivities The list of new activities.
 * @return The modified list of activities for the athlete.
 */
fun modifyList(athleteName: String, newActivities: List<String>): List<String> {

    val athletes = mapOf(
        "Michael Phelps" to listOf("Swimming", "Running", "Cycling"),
        "Serena Williams" to listOf("Tennis", "Gymnastics", "Sprinting"),
        "Usain Bolt" to listOf("Running", "Basketball", "Football")
    )

    // Retrieve the list of activities for the given athlete
    val activities = athletes.getOrDefault(athleteName, emptyList()).toMutableList()

    // Concatenate the new activities at the end of the athlete's list
    activities.addAll(newActivities)

    return activities
}