/**
 * This function takes in two lists and returns a list containing the common elements.
 *
 * @param list1 the first list
 * @param list2 the second list
 * @return a list of common elements between list1 and list2
 */
fun intersectionLists(list1: List<Any>, list2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()
    
    var i = 0
    
    while (i < list1.size) {
        var j = 0
        while (j < list2.size) {
            if (list1[i] == list2[j]) {
                intersection.add(list1[i])
                break
            }
            j++
        }
        i++
    }
    
    return intersection
}
/**
 * This function takes in two lists and returns a list containing the common elements.
 *
 * @param list1 the first list
 * @param list2 the second list
 * @return a list of common elements between list1 and list2
 */
fun intersectionLists(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * This function takes in two lists and returns a list containing the common elements.
 *
 * @param list1 the first list
 * @param list2 the second list
 * @return a list of common elements between list1 and list2
 */
fun intersectionLists(list1: List<Any>, list2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()
    
    var i = 0
    
    while (i < list1.size) {
        var j = 0
        while (j < list2.size) {
            if (list1[i] == list2[j]) {
                intersection.add(list1[i])
                break
            }
            j++
        }
        i++
    }
    
    return intersection
}