/**
 * Given a phrase and a dictionary of numbers, remove the vowels present in the phrase
 * and concatenate the corresponding number values from the dictionary.
 *
 * @param phrase A string representing the input phrase.
 * @param numDict A dictionary with numbers as keys and corresponding values.
 * @return The concatenated string of number values.
 *
 * Example:
 * removeVowelsAndConcatenate("Hello world", mapOf(1 to "a", 2 to "e", 3 to "i", 4 to "o", 5 to "u"))
 * Output: '523'
 */
fun removeVowelsAndConcatenate(phrase: String, numDict: Map<Int, String>): String {

    val vowels = listOf('a', 'e', 'i', 'o', 'u')
    var result = ""

    for (character in phrase) {
        if (character.toLowerCase() !in vowels) {
            for ((key, value) in numDict) {
                if (value.toLowerCase() == character.toLowerCase().toString()) {
                    result += key
                    break
                }
            }
        }
    }

    return result
}
/**
 * Given a phrase and a dictionary of numbers, remove the vowels present in the phrase
 * and concatenate the corresponding number values from the dictionary.
 *
 * @param phrase A string representing the input phrase.
 * @param numDict A dictionary with numbers as keys and corresponding values.
 * @return The concatenated string of number values.
 *
 * Example:
 * removeVowelsAndConcatenate("Hello world", mapOf(1 to "a", 2 to "e", 3 to "i", 4 to "o", 5 to "u"))
 * Output: '523'
 */
fun removeVowelsAndConcatenate(phrase: String, numDict: Map<Int, String>): String {
/**
 * Given a phrase and a dictionary of numbers, remove the vowels present in the phrase
 * and concatenate the corresponding number values from the dictionary.
 *
 * @param phrase A string representing the input phrase.
 * @param numDict A dictionary with numbers as keys and corresponding values.
 * @return The concatenated string of number values.
 *
 * Example:
 * removeVowelsAndConcatenate("Hello world", mapOf(1 to "a", 2 to "e", 3 to "i", 4 to "o", 5 to "u"))
 * Output: '523'
 */
fun removeVowelsAndConcatenate(phrase: String, numDict: Map<Int, String>): String {

    val vowels = listOf('a', 'e', 'i', 'o', 'u')
    var result = ""

    for (character in phrase) {
        if (character.toLowerCase() !in vowels) {
            for ((key, value) in numDict) {
                if (value.toLowerCase() == character.toLowerCase().toString()) {
                    result += key
                    break
                }
            }
        }
    }

    return result
}