/**
 * You are an interior designer who wants to update the colors of certain furniture in a room.
 * Given a list of furniture names and a dictionary representing the room with the existing furniture colors,
 * your task is to update the colors of the furniture in the room.
 *
 * @param furnitureList A list of furniture names to update the colors.
 * @param roomDict A dictionary representing the room with the existing furniture colors.
 * @return A dictionary representing the updated room with the modified furniture colors.
 */
fun updateFurnitureColors(furnitureList: List<String>, roomDict: MutableMap<String, String>): MutableMap<String, String> {

    for (furniture in furnitureList) {
        // Check if the furniture exists in the room dictionary
        if (roomDict.containsKey(furniture)) {
            // Get the current color of the furniture
            val currentColor = roomDict[furniture]
            
            // Prompt the user to enter the new color for the furniture
            print("Enter the new color for $furniture: ")
            val newColor = readLine() ?: ""
            
            // Update the color of the furniture in the room dictionary
            roomDict[furniture] = newColor
            
            println("Color updated successfully for $furniture")
        } else {
            println("$furniture does not exist in the room dictionary")
        }
    }
    return roomDict
}
/**
 * You are an interior designer who wants to update the colors of certain furniture in a room.
 * Given a list of furniture names and a dictionary representing the room with the existing furniture colors,
 * your task is to update the colors of the furniture in the room.
 *
 * @param furnitureList A list of furniture names to update the colors.
 * @param roomDict A dictionary representing the room with the existing furniture colors.
 * @return A dictionary representing the updated room with the modified furniture colors.
 */
fun updateFurnitureColors(furnitureList: List<String>, roomDict: MutableMap<String, String>): MutableMap<String, String> {
/**
 * You are an interior designer who wants to update the colors of certain furniture in a room.
 * Given a list of furniture names and a dictionary representing the room with the existing furniture colors,
 * your task is to update the colors of the furniture in the room.
 *
 * @param furnitureList A list of furniture names to update the colors.
 * @param roomDict A dictionary representing the room with the existing furniture colors.
 * @return A dictionary representing the updated room with the modified furniture colors.
 */
fun updateFurnitureColors(furnitureList: List<String>, roomDict: MutableMap<String, String>): MutableMap<String, String> {

    for (furniture in furnitureList) {
        // Check if the furniture exists in the room dictionary
        if (roomDict.containsKey(furniture)) {
            // Get the current color of the furniture
            val currentColor = roomDict[furniture]
            
            // Prompt the user to enter the new color for the furniture
            print("Enter the new color for $furniture: ")
            val newColor = readLine() ?: ""
            
            // Update the color of the furniture in the room dictionary
            roomDict[furniture] = newColor
            
            println("Color updated successfully for $furniture")
        } else {
            println("$furniture does not exist in the room dictionary")
        }
    }
    return roomDict
}