/**
 * This function takes in two dictionaries: cities and continents. The 'cities' dictionary contains the name of the city as
 * the key and the population as the value. The 'continents' dictionary contains the name of the city as the key and
 * the corresponding continent as the value. The function will return a list of cities that are common to both dictionaries.
 */
fun findCommonCities(cities: Map<String, Int>, continents: Map<String, String>): List<String> {

    val commonCities = mutableListOf<String>()

    // Iterate over the cities dictionary and enumerate the items
    for ((city, _) in cities) {
        // Check if the city exists in the continents dictionary
        if (continents.containsKey(city)) {
            // Append the common city to the commonCities list
            commonCities.add(city)
        }
    }

    return commonCities
}
/**
 * This function takes in two dictionaries: cities and continents. The 'cities' dictionary contains the name of the city as
 * the key and the population as the value. The 'continents' dictionary contains the name of the city as the key and
 * the corresponding continent as the value. The function will return a list of cities that are common to both dictionaries.
 */
fun findCommonCities(cities: Map<String, Int>, continents: Map<String, String>): List<String> {
/**
 * This function takes in two dictionaries: cities and continents. The 'cities' dictionary contains the name of the city as
 * the key and the population as the value. The 'continents' dictionary contains the name of the city as the key and
 * the corresponding continent as the value. The function will return a list of cities that are common to both dictionaries.
 */
fun findCommonCities(cities: Map<String, Int>, continents: Map<String, String>): List<String> {

    val commonCities = mutableListOf<String>()

    // Iterate over the cities dictionary and enumerate the items
    for ((city, _) in cities) {
        // Check if the city exists in the continents dictionary
        if (continents.containsKey(city)) {
            // Append the common city to the commonCities list
            commonCities.add(city)
        }
    }

    return commonCities
}