/**
 * Given two lists, return a tuple containing the common elements between them.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A tuple containing the common elements between list1 and list2.
 */
fun returnCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

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

    // Iterate over the first list
    for (element in list1) {
        // Check if the element is present in the second list and not already in commonElements
        if (element in list2 && element !in commonElements) {
            // Add the common element to commonElements list
            commonElements.add(element)
        }
    }

    return commonElements
}
/**
 * Given two lists, return a tuple containing the common elements between them.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A tuple containing the common elements between list1 and list2.
 */
fun returnCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * Given two lists, return a tuple containing the common elements between them.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A tuple containing the common elements between list1 and list2.
 */
fun returnCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

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

    // Iterate over the first list
    for (element in list1) {
        // Check if the element is present in the second list and not already in commonElements
        if (element in list2 && element !in commonElements) {
            // Add the common element to commonElements list
            commonElements.add(element)
        }
    }

    return commonElements
}