/**
 * Given two dictionaries representing countries and their respective cities, find the common countries
 * present in both dictionaries.
 *
 * @param countriesDict1 A dictionary mapping countries to cities
 * @param countriesDict2 A dictionary mapping countries to cities
 * @return A list of common countries present in both dictionaries
 */
fun findCommonCountries(countriesDict1: Map<String, String>, countriesDict2: Map<String, String>): List<String> {

    val commonCountries = mutableListOf<String>()

    for ((country1, _) in countriesDict1) {
        if (country1 !in countriesDict2 && country1 != null) {
            commonCountries.add(country1)
        }
    }

    return commonCountries
}
/**
 * Given two dictionaries representing countries and their respective cities, find the common countries
 * present in both dictionaries.
 *
 * @param countriesDict1 A dictionary mapping countries to cities
 * @param countriesDict2 A dictionary mapping countries to cities
 * @return A list of common countries present in both dictionaries
 */
fun findCommonCountries(countriesDict1: Map<String, String>, countriesDict2: Map<String, String>): List<String> {
/**
 * Given two dictionaries representing countries and their respective cities, find the common countries
 * present in both dictionaries.
 *
 * @param countriesDict1 A dictionary mapping countries to cities
 * @param countriesDict2 A dictionary mapping countries to cities
 * @return A list of common countries present in both dictionaries
 */
fun findCommonCountries(countriesDict1: Map<String, String>, countriesDict2: Map<String, String>): List<String> {

    val commonCountries = mutableListOf<String>()

    for ((country1, _) in countriesDict1) {
        if (country1 !in countriesDict2 && country1 != null) {
            commonCountries.add(country1)
        }
    }

    return commonCountries
}