/**
 * You are an archaeologist working on a project. You have discovered an ancient dictionary
 * containing the details of various artifacts. Your task is to modify the values in the dictionary
 * based on certain conditions. However, you encounter a problem - some of the values in the dictionary
 * are tuples. Can you figure out how to modify the values correctly and return the updated dictionary?
 *
 * @param dictionary A dictionary containing details of various artifacts. The keys are names of the artifacts,
 * and the values can be either single values or tuples.
 * @return The modified dictionary with updated values.
 *
 * Difficulty: Hard
 */
fun modifyDictionary(dictionary: Map<String, Any>): Map<String, Any> {

    val modifiedDictionary = mutableMapOf<String, Any>()

    for ((key, value) in dictionary) {
        if (value is Pair<*, *>) {
            // Modify the tuple values here

            // YOUR CODE HERE

            modifiedDictionary[key] = value
        } else {
            // Modify the non-tuple values here

            // YOUR CODE HERE

            modifiedDictionary[key] = value
        }
    }

    return modifiedDictionary
}
/**
 * You are an archaeologist working on a project. You have discovered an ancient dictionary
 * containing the details of various artifacts. Your task is to modify the values in the dictionary
 * based on certain conditions. However, you encounter a problem - some of the values in the dictionary
 * are tuples. Can you figure out how to modify the values correctly and return the updated dictionary?
 *
 * @param dictionary A dictionary containing details of various artifacts. The keys are names of the artifacts,
 * and the values can be either single values or tuples.
 * @return The modified dictionary with updated values.
 *
 * Difficulty: Hard
 */
fun modifyDictionary(dictionary: Map<String, Any>): Map<String, Any> {
/**
 * You are an archaeologist working on a project. You have discovered an ancient dictionary
 * containing the details of various artifacts. Your task is to modify the values in the dictionary
 * based on certain conditions. However, you encounter a problem - some of the values in the dictionary
 * are tuples. Can you figure out how to modify the values correctly and return the updated dictionary?
 *
 * @param dictionary A dictionary containing details of various artifacts. The keys are names of the artifacts,
 * and the values can be either single values or tuples.
 * @return The modified dictionary with updated values.
 *
 * Difficulty: Hard
 */
fun modifyDictionary(dictionary: Map<String, Any>): Map<String, Any> {

    val modifiedDictionary = mutableMapOf<String, Any>()

    for ((key, value) in dictionary) {
        if (value is Pair<*, *>) {
            // Modify the tuple values here

            // YOUR CODE HERE

            modifiedDictionary[key] = value
        } else {
            // Modify the non-tuple values here

            // YOUR CODE HERE

            modifiedDictionary[key] = value
        }
    }

    return modifiedDictionary
}