/**
 * Given two lists lst1 and lst2, this function returns a new list
 * with the common elements between lst1 and lst2 replaced by their indices.
 *
 * @param lst1 First list
 * @param lst2 Second list
 * @return New list with common elements replaced by their indices
 */
fun changeElements(lst1: List<Int>, lst2: List<Int>): List<Int> {

    val newLst = mutableListOf<Int>()

    for (i in lst1.indices) {
        if (lst1[i] in lst2) {
            newLst.add(i)
        } else {
            newLst.add(lst1[i])
        }
    }

    return newLst
}
/**
 * Given two lists lst1 and lst2, this function returns a new list
 * with the common elements between lst1 and lst2 replaced by their indices.
 *
 * @param lst1 First list
 * @param lst2 Second list
 * @return New list with common elements replaced by their indices
 */
fun changeElements(lst1: List<Int>, lst2: List<Int>): List<Int> {
/**
 * Given two lists lst1 and lst2, this function returns a new list
 * with the common elements between lst1 and lst2 replaced by their indices.
 *
 * @param lst1 First list
 * @param lst2 Second list
 * @return New list with common elements replaced by their indices
 */
fun changeElements(lst1: List<Int>, lst2: List<Int>): List<Int> {

    val newLst = mutableListOf<Int>()

    for (i in lst1.indices) {
        if (lst1[i] in lst2) {
            newLst.add(i)
        } else {
            newLst.add(lst1[i])
        }
    }

    return newLst
}