/**
 * Replaces a specific value in a dictionary with a new value.
 */
fun modifyDictElements(dictionary: MutableMap<String, Int>, index: Int, newValue: Int) {

    // Get the list of keys from the dictionary
    val keys = dictionary.keys.toList()

    // Check if the index is within the range of available keys
    if (index >= 0 && index < keys.size) {
        // Get the key at the specified index
        val key = keys[index]

        // Modify the value associated with the key
        dictionary[key] = newValue
    }
}

// Example usage of the modifyDictElements function
/**
 * Replaces a specific value in a dictionary with a new value.
 */
fun modifyDictElements(dictionary: MutableMap<String, Int>, index: Int, newValue: Int) {
/**
 * Replaces a specific value in a dictionary with a new value.
 */
fun modifyDictElements(dictionary: MutableMap<String, Int>, index: Int, newValue: Int) {

    // Get the list of keys from the dictionary
    val keys = dictionary.keys.toList()

    // Check if the index is within the range of available keys
    if (index >= 0 && index < keys.size) {
        // Get the key at the specified index
        val key = keys[index]

        // Modify the value associated with the key
        dictionary[key] = newValue
    }
}

// Example usage of the modifyDictElements function