/**
 * Given a list of dancers and an index, return the selected tuple element from the dancer at the given index.
 *
 * The dancer tuples contain the following elements in order:
 * - Name (String)
 * - Age (Int)
 * - Dance Style (String)
 * - Number of Awards (Int)
 *
 * @param dancerList A list of tuples containing dancer information.
 * @param index An integer representing the index of the dancer in the dancerList.
 * @return The selected tuple element from the dancer at the given index.
 *
 * Example:
 * selectTupleElement(listOf("John" to 25 to "Ballet" to 5, "Emma" to 30 to "Hip Hop" to 2, "Michael" to 20 to "Salsa" to 3), 1)
 * Output: "Emma"
 */
fun selectTupleElement(dancerList: List<Pair<String, Pair<Int, Pair<String, Int>>>>, index: Int): String {

    // Access the selected dancer tuple using the provided index
    val selectedDancer = dancerList[index]

    // Accessing the first element of the tuple (name)
    val selectedName = selectedDancer.first

    return selectedName
}
/**
 * Given a list of dancers and an index, return the selected tuple element from the dancer at the given index.
 *
 * The dancer tuples contain the following elements in order:
 * - Name (String)
 * - Age (Int)
 * - Dance Style (String)
 * - Number of Awards (Int)
 *
 * @param dancerList A list of tuples containing dancer information.
 * @param index An integer representing the index of the dancer in the dancerList.
 * @return The selected tuple element from the dancer at the given index.
 *
 * Example:
 * selectTupleElement(listOf("John" to 25 to "Ballet" to 5, "Emma" to 30 to "Hip Hop" to 2, "Michael" to 20 to "Salsa" to 3), 1)
 * Output: "Emma"
 */
fun selectTupleElement(dancerList: List<Pair<String, Pair<Int, Pair<String, Int>>>>, index: Int): String {
/**
 * Given a list of dancers and an index, return the selected tuple element from the dancer at the given index.
 *
 * The dancer tuples contain the following elements in order:
 * - Name (String)
 * - Age (Int)
 * - Dance Style (String)
 * - Number of Awards (Int)
 *
 * @param dancerList A list of tuples containing dancer information.
 * @param index An integer representing the index of the dancer in the dancerList.
 * @return The selected tuple element from the dancer at the given index.
 *
 * Example:
 * selectTupleElement(listOf("John" to 25 to "Ballet" to 5, "Emma" to 30 to "Hip Hop" to 2, "Michael" to 20 to "Salsa" to 3), 1)
 * Output: "Emma"
 */
fun selectTupleElement(dancerList: List<Pair<String, Pair<Int, Pair<String, Int>>>>, index: Int): String {

    // Access the selected dancer tuple using the provided index
    val selectedDancer = dancerList[index]

    // Accessing the first element of the tuple (name)
    val selectedName = selectedDancer.first

    return selectedName
}