/**
 * Given two tuples, find the common elements between them.
 *
 * @param tup1 The first tuple.
 * @param tup2 The second tuple.
 * @return A list containing the common elements between the two tuples.
 */
fun findCommonElements(tup1: List<Any>, tup2: List<Any>): List<Any> {

    // Initialize an empty list to store the common elements
    val commonElements = mutableListOf<Any>()

    // Iterate over the elements in tup1
    for (element in tup1) {
        // Check if the element is also present in tup2
        if (element in tup2) {
            // Append the common element to the list
            commonElements.add(element)
        }
    }

    return commonElements
}
/**
 * Given two tuples, find the common elements between them.
 *
 * @param tup1 The first tuple.
 * @param tup2 The second tuple.
 * @return A list containing the common elements between the two tuples.
 */
fun findCommonElements(tup1: List<Any>, tup2: List<Any>): List<Any> {
/**
 * Given two tuples, find the common elements between them.
 *
 * @param tup1 The first tuple.
 * @param tup2 The second tuple.
 * @return A list containing the common elements between the two tuples.
 */
fun findCommonElements(tup1: List<Any>, tup2: List<Any>): List<Any> {

    // Initialize an empty list to store the common elements
    val commonElements = mutableListOf<Any>()

    // Iterate over the elements in tup1
    for (element in tup1) {
        // Check if the element is also present in tup2
        if (element in tup2) {
            // Append the common element to the list
            commonElements.add(element)
        }
    }

    return commonElements
}