/**
 * Given a dictionary, this function iterates over its values, printing them with a step parameter.
 *
 * @param dictionary The dictionary to be iterated over.
 * @param step The step parameter to be used for iteration.
 */
fun iterateDictWithStep(dictionary: Map<String, String>, step: Int) {

    // STEP 1: Sort the keys in the dictionary
    val sortedKeys = dictionary.keys.sorted()

    // STEP 2: Find the maximum step value that is less than or equal to the number of keys
    val maxStep = minOf(sortedKeys.size, step)

    // STEP 3: Iterate over the keys using the step parameter
    for (i in 0 until sortedKeys.size step maxStep) {
        val key = sortedKeys[i]
        val value = dictionary[key]
        println(value)
    }
}
/**
 * Given a dictionary, this function iterates over its values, printing them with a step parameter.
 *
 * @param dictionary The dictionary to be iterated over.
 * @param step The step parameter to be used for iteration.
 */
fun iterateDictWithStep(dictionary: Map<String, String>, step: Int) {
/**
 * Given a dictionary, this function iterates over its values, printing them with a step parameter.
 *
 * @param dictionary The dictionary to be iterated over.
 * @param step The step parameter to be used for iteration.
 */
fun iterateDictWithStep(dictionary: Map<String, String>, step: Int) {

    // STEP 1: Sort the keys in the dictionary
    val sortedKeys = dictionary.keys.sorted()

    // STEP 2: Find the maximum step value that is less than or equal to the number of keys
    val maxStep = minOf(sortedKeys.size, step)

    // STEP 3: Iterate over the keys using the step parameter
    for (i in 0 until sortedKeys.size step maxStep) {
        val key = sortedKeys[i]
        val value = dictionary[key]
        println(value)
    }
}