/**
 * This function takes a nested dictionary and a list of indices and returns the value at the specified nested index.
 *
 * @param dictionary A nested dictionary.
 * @param indexList A list of indices specifying the nested index.
 * @return The value at the specified nested index.
 *
 * Example:
 * val dictionary = mapOf("a" to mapOf("b" to mapOf("c" to 1)))
 * val indexList = listOf("a", "b", "c")
 * nestedIndex(dictionary, indexList) -> 1
 */
fun nestedIndex(dictionary: Map<String, Any>, indexList: List<String>): Any {

    var value: Any = dictionary
    for (index in indexList) {
        value = (value as Map<*, *>)[index]!!
    }
    return value
}
/**
 * This function takes a nested dictionary and a list of indices and returns the value at the specified nested index.
 *
 * @param dictionary A nested dictionary.
 * @param indexList A list of indices specifying the nested index.
 * @return The value at the specified nested index.
 *
 * Example:
 * val dictionary = mapOf("a" to mapOf("b" to mapOf("c" to 1)))
 * val indexList = listOf("a", "b", "c")
 * nestedIndex(dictionary, indexList) -> 1
 */
fun nestedIndex(dictionary: Map<String, Any>, indexList: List<String>): Any {
/**
 * This function takes a nested dictionary and a list of indices and returns the value at the specified nested index.
 *
 * @param dictionary A nested dictionary.
 * @param indexList A list of indices specifying the nested index.
 * @return The value at the specified nested index.
 *
 * Example:
 * val dictionary = mapOf("a" to mapOf("b" to mapOf("c" to 1)))
 * val indexList = listOf("a", "b", "c")
 * nestedIndex(dictionary, indexList) -> 1
 */
fun nestedIndex(dictionary: Map<String, Any>, indexList: List<String>): Any {

    var value: Any = dictionary
    for (index in indexList) {
        value = (value as Map<*, *>)[index]!!
    }
    return value
}