/**
 * This function takes a list of words and a character as inputs, and analyzes each word in the list.
 * It returns a new list containing only the words that have the given character at the beginning and end.
 */
fun psychologistAnalysis(wordList: List<String>, character: Char): List<String> {

    // Initialize an empty list to store the analyzed words
    val analyzedWords = mutableListOf<String>()

    // Iterate over each word in the given list
    for (word in wordList) {
        // Check if the word starts and ends with the given character
        if (word.first() == character && word.last() == character) {
            // If the condition is satisfied, add the word to the analyzedWords list
            analyzedWords.add(word)
        }
    }

    return analyzedWords
}
/**
 * This function takes a list of words and a character as inputs, and analyzes each word in the list.
 * It returns a new list containing only the words that have the given character at the beginning and end.
 */
fun psychologistAnalysis(wordList: List<String>, character: Char): List<String> {
/**
 * This function takes a list of words and a character as inputs, and analyzes each word in the list.
 * It returns a new list containing only the words that have the given character at the beginning and end.
 */
fun psychologistAnalysis(wordList: List<String>, character: Char): List<String> {

    // Initialize an empty list to store the analyzed words
    val analyzedWords = mutableListOf<String>()

    // Iterate over each word in the given list
    for (word in wordList) {
        // Check if the word starts and ends with the given character
        if (word.first() == character && word.last() == character) {
            // If the condition is satisfied, add the word to the analyzedWords list
            analyzedWords.add(word)
        }
    }

    return analyzedWords
}