/**
 * The function takes a word as input and returns a tuple containing different forms of the word.
 *
 * @param word The input word
 * @return A tuple containing the word in uppercase, lowercase, and title case
 *
 * Examples:
 * getWordForms("linguist") -> ("LINGUIST", "linguist", "Linguist")
 * getWordForms("Code") -> ("CODE", "code", "Code")
 */
fun getWordForms(word: String): Triple<String, String, String> {

    // Check if the word contains only alphabetical characters
    if (!word.all { it.isLetter() }) {
        return Triple("Invalid input. Please enter a word with only alphabetical characters.", "", "")
    }

    // Convert the word to uppercase, lowercase, and title case
    val wordForms = Triple(word.toUpperCase(), word.toLowerCase(), word.capitalize())

    // Print each form of the word
    println("Uppercase: ${wordForms.first}")
    println("Lowercase: ${wordForms.second}")
    println("Title case: ${wordForms.third}")

    // Return the tuple containing the word forms
    return wordForms
}
/**
 * The function takes a word as input and returns a tuple containing different forms of the word.
 *
 * @param word The input word
 * @return A tuple containing the word in uppercase, lowercase, and title case
 *
 * Examples:
 * getWordForms("linguist") -> ("LINGUIST", "linguist", "Linguist")
 * getWordForms("Code") -> ("CODE", "code", "Code")
 */
fun getWordForms(word: String): Triple<String, String, String> {
/**
 * The function takes a word as input and returns a tuple containing different forms of the word.
 *
 * @param word The input word
 * @return A tuple containing the word in uppercase, lowercase, and title case
 *
 * Examples:
 * getWordForms("linguist") -> ("LINGUIST", "linguist", "Linguist")
 * getWordForms("Code") -> ("CODE", "code", "Code")
 */
fun getWordForms(word: String): Triple<String, String, String> {

    // Check if the word contains only alphabetical characters
    if (!word.all { it.isLetter() }) {
        return Triple("Invalid input. Please enter a word with only alphabetical characters.", "", "")
    }

    // Convert the word to uppercase, lowercase, and title case
    val wordForms = Triple(word.toUpperCase(), word.toLowerCase(), word.capitalize())

    // Print each form of the word
    println("Uppercase: ${wordForms.first}")
    println("Lowercase: ${wordForms.second}")
    println("Title case: ${wordForms.third}")

    // Return the tuple containing the word forms
    return wordForms
}