/**
 * This function takes a word and a list of letters as input and returns the count of how many times each letter appears in the word.
 */
fun countLetters(word: String, letters: List<Char>): Map<Char, Int> {

    val result = mutableMapOf<Char, Int>()
    for (letter in letters) {
        var count = 0
        for (char in word) {
            if (char == letter) {
                count++
            }
        }
        result[letter] = count
    }
    return result
}
/**
 * This function takes a word and a list of letters as input and returns the count of how many times each letter appears in the word.
 */
fun countLetters(word: String, letters: List<Char>): Map<Char, Int> {
/**
 * This function takes a word and a list of letters as input and returns the count of how many times each letter appears in the word.
 */
fun countLetters(word: String, letters: List<Char>): Map<Char, Int> {

    val result = mutableMapOf<Char, Int>()
    for (letter in letters) {
        var count = 0
        for (char in word) {
            if (char == letter) {
                count++
            }
        }
        result[letter] = count
    }
    return result
}