/**
 * Given a list of athletes represented as dictionaries, modify the 'name' key of each athlete.
 * The modified 'name' should include the athlete's rank when enumerated starting from 1.
 *
 * @param athletes A list of dictionaries representing athletes. Each dictionary contains a 'name' key.
 * @return The modified list of athletes.
 *
 * Example:
 * modifyList(listOf(mapOf("name" to "John"), mapOf("name" to "Jane"), mapOf("name" to "Alex"))) ->
 * listOf(mapOf("name" to "1. John"), mapOf("name" to "2. Jane"), mapOf("name" to "3. Alex"))
 */
fun modifyList(athletes: List<MutableMap<String, String>>): List<MutableMap<String, String>> {

    for ((index, athlete) in athletes.withIndex()) {
        athlete["name"] = "${index + 1}. ${athlete["name"]}"
    }
    return athletes
}
/**
 * Given a list of athletes represented as dictionaries, modify the 'name' key of each athlete.
 * The modified 'name' should include the athlete's rank when enumerated starting from 1.
 *
 * @param athletes A list of dictionaries representing athletes. Each dictionary contains a 'name' key.
 * @return The modified list of athletes.
 *
 * Example:
 * modifyList(listOf(mapOf("name" to "John"), mapOf("name" to "Jane"), mapOf("name" to "Alex"))) ->
 * listOf(mapOf("name" to "1. John"), mapOf("name" to "2. Jane"), mapOf("name" to "3. Alex"))
 */
fun modifyList(athletes: List<MutableMap<String, String>>): List<MutableMap<String, String>> {
/**
 * Given a list of athletes represented as dictionaries, modify the 'name' key of each athlete.
 * The modified 'name' should include the athlete's rank when enumerated starting from 1.
 *
 * @param athletes A list of dictionaries representing athletes. Each dictionary contains a 'name' key.
 * @return The modified list of athletes.
 *
 * Example:
 * modifyList(listOf(mapOf("name" to "John"), mapOf("name" to "Jane"), mapOf("name" to "Alex"))) ->
 * listOf(mapOf("name" to "1. John"), mapOf("name" to "2. Jane"), mapOf("name" to "3. Alex"))
 */
fun modifyList(athletes: List<MutableMap<String, String>>): List<MutableMap<String, String>> {

    for ((index, athlete) in athletes.withIndex()) {
        athlete["name"] = "${index + 1}. ${athlete["name"]}"
    }
    return athletes
}