/**
 * Given a list and a list of indexes, this function returns a new list 
 * containing the elements of the original list at the specified indexes.
 */
fun accessElementsInList(lst: List<Any>, indexes: List<Int>): List<Any> {

    val accessedElements = mutableListOf<Any>()
    
    for (index in indexes) {
        if (index in lst.indices) {
            accessedElements.add(lst[index])
        }
    }
    
    return accessedElements
}
/**
 * Given a list and a list of indexes, this function returns a new list 
 * containing the elements of the original list at the specified indexes.
 */
fun accessElementsInList(lst: List<Any>, indexes: List<Int>): List<Any> {
/**
 * Given a list and a list of indexes, this function returns a new list 
 * containing the elements of the original list at the specified indexes.
 */
fun accessElementsInList(lst: List<Any>, indexes: List<Int>): List<Any> {

    val accessedElements = mutableListOf<Any>()
    
    for (index in indexes) {
        if (index in lst.indices) {
            accessedElements.add(lst[index])
        }
    }
    
    return accessedElements
}