/**
 * This function takes in two tuples and returns their intersection.
 *
 * @param tup1 First tuple of elements
 * @param tup2 Second tuple of elements
 * @return Intersection of the two tuples
 */
fun findTupleIntersection(tup1: List<Any>, tup2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()

    // Iterate through each element in the first tuple
    for (ele1 in tup1) {
        // Iterate through each element in the second tuple
        for (ele2 in tup2) {
            // Check if the current element from the first tuple is equal to the current element from the second tuple
            if (ele1 == ele2) {
                // Add the common element to the intersection list
                intersection.add(ele1)
            }
        }
    }

    return intersection
}
/**
 * This function takes in two tuples and returns their intersection.
 *
 * @param tup1 First tuple of elements
 * @param tup2 Second tuple of elements
 * @return Intersection of the two tuples
 */
fun findTupleIntersection(tup1: List<Any>, tup2: List<Any>): List<Any> {
/**
 * This function takes in two tuples and returns their intersection.
 *
 * @param tup1 First tuple of elements
 * @param tup2 Second tuple of elements
 * @return Intersection of the two tuples
 */
fun findTupleIntersection(tup1: List<Any>, tup2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()

    // Iterate through each element in the first tuple
    for (ele1 in tup1) {
        // Iterate through each element in the second tuple
        for (ele2 in tup2) {
            // Check if the current element from the first tuple is equal to the current element from the second tuple
            if (ele1 == ele2) {
                // Add the common element to the intersection list
                intersection.add(ele1)
            }
        }
    }

    return intersection
}