/**
 * Given an athlete and an element, add the element to the set of the athlete and find its index.
 *
 * @param athlete Set containing the elements of the athlete.
 * @param element Element to be added to the set of the athlete.
 * @return The index of the added element in the set.
 *
 * Example:
 * add_to_set_and_find_index(setOf("tennis", "swimming", "basketball"), "soccer") // Output: 3
 */
fun addToSetAndFindIndex(athlete: MutableSet<String>, element: String): Int {

    // Add the element to the set of the athlete
    athlete.add(element)

    // Find the index of the added element in the set
    val index = athlete.indexOf(element)

    return index
}
/**
 * Given an athlete and an element, add the element to the set of the athlete and find its index.
 *
 * @param athlete Set containing the elements of the athlete.
 * @param element Element to be added to the set of the athlete.
 * @return The index of the added element in the set.
 *
 * Example:
 * add_to_set_and_find_index(setOf("tennis", "swimming", "basketball"), "soccer") // Output: 3
 */
fun addToSetAndFindIndex(athlete: MutableSet<String>, element: String): Int {
/**
 * Given an athlete and an element, add the element to the set of the athlete and find its index.
 *
 * @param athlete Set containing the elements of the athlete.
 * @param element Element to be added to the set of the athlete.
 * @return The index of the added element in the set.
 *
 * Example:
 * add_to_set_and_find_index(setOf("tennis", "swimming", "basketball"), "soccer") // Output: 3
 */
fun addToSetAndFindIndex(athlete: MutableSet<String>, element: String): Int {

    // Add the element to the set of the athlete
    athlete.add(element)

    // Find the index of the added element in the set
    val index = athlete.indexOf(element)

    return index
}