/**
 * Given the name of an athlete and a dictionary of sports and medalists, find the medals won by the athlete.
 *
 * @param athleteName The name of the athlete.
 * @param sports A dictionary where the keys are sports and the values are sets of medalists in each sport.
 * @return A list of medals won by the athlete.
 */
fun checkMedal(athleteName: String, sports: Map<String, Set<String>>): List<String> {

    val medals = mutableListOf<String>()

    for ((sport, medalists) in sports) {
        if (athleteName in medalists) {
            medals.add(sport)
        }
    }

    return medals
}
/**
 * Given the name of an athlete and a dictionary of sports and medalists, find the medals won by the athlete.
 *
 * @param athleteName The name of the athlete.
 * @param sports A dictionary where the keys are sports and the values are sets of medalists in each sport.
 * @return A list of medals won by the athlete.
 */
fun checkMedal(athleteName: String, sports: Map<String, Set<String>>): List<String> {
/**
 * Given the name of an athlete and a dictionary of sports and medalists, find the medals won by the athlete.
 *
 * @param athleteName The name of the athlete.
 * @param sports A dictionary where the keys are sports and the values are sets of medalists in each sport.
 * @return A list of medals won by the athlete.
 */
fun checkMedal(athleteName: String, sports: Map<String, Set<String>>): List<String> {

    val medals = mutableListOf<String>()

    for ((sport, medalists) in sports) {
        if (athleteName in medalists) {
            medals.add(sport)
        }
    }

    return medals
}