/**
 * Given two lists, find the intersection of the two lists.
 * This function returns a new list containing the common elements found in both lists.
 *
 * @param list1 The first list
 * @param list2 The second list
 * @return The list containing the common elements found in both lists
 */
fun findIntersectionLists(list1: List<Any>, list2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()

    // Loop through each element in list1
    for (element1 in list1) {
        // Loop through each element in list2
        for (element2 in list2) {
            // Check if the elements are equal
            if (element1 == element2) {
                // Append the common element to the intersection list
                intersection.add(element1)
            }
        }
    }

    // Return the intersection list
    return intersection
}
/**
 * Given two lists, find the intersection of the two lists.
 * This function returns a new list containing the common elements found in both lists.
 *
 * @param list1 The first list
 * @param list2 The second list
 * @return The list containing the common elements found in both lists
 */
fun findIntersectionLists(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * Given two lists, find the intersection of the two lists.
 * This function returns a new list containing the common elements found in both lists.
 *
 * @param list1 The first list
 * @param list2 The second list
 * @return The list containing the common elements found in both lists
 */
fun findIntersectionLists(list1: List<Any>, list2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()

    // Loop through each element in list1
    for (element1 in list1) {
        // Loop through each element in list2
        for (element2 in list2) {
            // Check if the elements are equal
            if (element1 == element2) {
                // Append the common element to the intersection list
                intersection.add(element1)
            }
        }
    }

    // Return the intersection list
    return intersection
}