/**
 * Given two lists, this function finds the common elements at the same indices in the lists.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

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

    // Iterate over the range of the minimum length between the two lists
    for (i in 0 until minOf(list1.size, list2.size)) {
        // Check if the elements at the same indices are equal
        if (list1[i] == list2[i]) {
            // Append the common element to the commonElements list
            commonElements.add(list1[i])
        }
    }

    return commonElements
}
/**
 * Given two lists, this function finds the common elements at the same indices in the lists.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * Given two lists, this function finds the common elements at the same indices in the lists.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

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

    // Iterate over the range of the minimum length between the two lists
    for (i in 0 until minOf(list1.size, list2.size)) {
        // Check if the elements at the same indices are equal
        if (list1[i] == list2[i]) {
            // Append the common element to the commonElements list
            commonElements.add(list1[i])
        }
    }

    return commonElements
}