/**
 * You are an archaeologist searching for ancient inscriptions.
 * You have found two words written in an ancient language and you want to identify
 * the letters that are common in both words. Complete the code below to find the
 * common letters in the two words.
 *
 * @param word1 The first word.
 * @param word2 The second word.
 * @return A string containing the common letters found in both words.
 */
fun findCommonLetters(word1: String, word2: String): String {

    var commonLetters = ""

    for (letter1 in word1) {
        for (letter2 in word2) {
            if (letter1 == letter2) {
                commonLetters += letter1
            }
        }
    }

    return commonLetters
}
/**
 * You are an archaeologist searching for ancient inscriptions.
 * You have found two words written in an ancient language and you want to identify
 * the letters that are common in both words. Complete the code below to find the
 * common letters in the two words.
 *
 * @param word1 The first word.
 * @param word2 The second word.
 * @return A string containing the common letters found in both words.
 */
fun findCommonLetters(word1: String, word2: String): String {
/**
 * You are an archaeologist searching for ancient inscriptions.
 * You have found two words written in an ancient language and you want to identify
 * the letters that are common in both words. Complete the code below to find the
 * common letters in the two words.
 *
 * @param word1 The first word.
 * @param word2 The second word.
 * @return A string containing the common letters found in both words.
 */
fun findCommonLetters(word1: String, word2: String): String {

    var commonLetters = ""

    for (letter1 in word1) {
        for (letter2 in word2) {
            if (letter1 == letter2) {
                commonLetters += letter1
            }
        }
    }

    return commonLetters
}