/**
 * Given an athlete and an item, append the item to the athlete's equipment if the athlete is already part of the team,
 * otherwise print a message stating that the athlete is not part of the team.
 */
fun appendNewElements(athlete: String, item: String) {

    val team = listOf("John", "Mary", "David", "Sarah")
    
    // Check if the athlete is part of the team
    if (athlete in team) {
        // Append the item to the athlete's equipment list
        val athleteEquipment = mapOf(
            "John" to mutableListOf("Basketball", "Shoes"),
            "Mary" to mutableListOf("Soccer ball"),
            "David" to mutableListOf("Tennis racket"),
            "Sarah" to mutableListOf()
        )
        athleteEquipment[athlete]?.add(item)
        println("$item has been added to $athlete's equipment.")
    } else {
        println("$athlete is not part of the team.")
    }
}
/**
 * Given an athlete and an item, append the item to the athlete's equipment if the athlete is already part of the team,
 * otherwise print a message stating that the athlete is not part of the team.
 */
fun appendNewElements(athlete: String, item: String) {
/**
 * Given an athlete and an item, append the item to the athlete's equipment if the athlete is already part of the team,
 * otherwise print a message stating that the athlete is not part of the team.
 */
fun appendNewElements(athlete: String, item: String) {

    val team = listOf("John", "Mary", "David", "Sarah")
    
    // Check if the athlete is part of the team
    if (athlete in team) {
        // Append the item to the athlete's equipment list
        val athleteEquipment = mapOf(
            "John" to mutableListOf("Basketball", "Shoes"),
            "Mary" to mutableListOf("Soccer ball"),
            "David" to mutableListOf("Tennis racket"),
            "Sarah" to mutableListOf()
        )
        athleteEquipment[athlete]?.add(item)
        println("$item has been added to $athlete's equipment.")
    } else {
        println("$athlete is not part of the team.")
    }
}