/**
 * Given a list of tuples, access the elements in each tuple and create a set containing the intersection of these elements.
 *
 * @param tuples A list of tuples containing elements.
 * @return A set containing the intersection of the elements in the tuples.
 */
fun accessTupleElementsAndCreateSet(tuples: List<Triple<Any, Any, Any>>): Set<Any> {

    // Initialize an empty set
    val intersectionSet = mutableSetOf<Any>()

    // Iterate over each tuple in the list
    for (tupleElements in tuples) {
        // Unpack the tuple elements
        val (element1, element2, element3) = tupleElements

        // Add the elements to the intersection set
        intersectionSet.add(element1)
        intersectionSet.add(element2)
        intersectionSet.add(element3)
    }

    return intersectionSet
}
/**
 * Given a list of tuples, access the elements in each tuple and create a set containing the intersection of these elements.
 *
 * @param tuples A list of tuples containing elements.
 * @return A set containing the intersection of the elements in the tuples.
 */
fun accessTupleElementsAndCreateSet(tuples: List<Triple<Any, Any, Any>>): Set<Any> {
/**
 * Given a list of tuples, access the elements in each tuple and create a set containing the intersection of these elements.
 *
 * @param tuples A list of tuples containing elements.
 * @return A set containing the intersection of the elements in the tuples.
 */
fun accessTupleElementsAndCreateSet(tuples: List<Triple<Any, Any, Any>>): Set<Any> {

    // Initialize an empty set
    val intersectionSet = mutableSetOf<Any>()

    // Iterate over each tuple in the list
    for (tupleElements in tuples) {
        // Unpack the tuple elements
        val (element1, element2, element3) = tupleElements

        // Add the elements to the intersection set
        intersectionSet.add(element1)
        intersectionSet.add(element2)
        intersectionSet.add(element3)
    }

    return intersectionSet
}