/**
 * This function takes in a list of words and a keyword and returns the index of the keyword if it is found,
 * but it includes a break statement to stop searching after finding the first occurrence of the keyword.
 *
 * @param word The list of words to search through.
 * @param keyword The keyword to search for.
 * @return The index of the first occurrence of the keyword, or -1 if the keyword is not found.
 */
fun firefighterSearch(word: List<String>, keyword: String): Int {

    var index = -1
    var found = false

    for ((i, w) in word.withIndex()) {
        if (w == keyword) {
            index = i
            found = true
            break  // Add the break statement here to stop searching after finding the first occurrence
        }
    }

    return index
}
/**
 * This function takes in a list of words and a keyword and returns the index of the keyword if it is found,
 * but it includes a break statement to stop searching after finding the first occurrence of the keyword.
 *
 * @param word The list of words to search through.
 * @param keyword The keyword to search for.
 * @return The index of the first occurrence of the keyword, or -1 if the keyword is not found.
 */
fun firefighterSearch(word: List<String>, keyword: String): Int {
/**
 * This function takes in a list of words and a keyword and returns the index of the keyword if it is found,
 * but it includes a break statement to stop searching after finding the first occurrence of the keyword.
 *
 * @param word The list of words to search through.
 * @param keyword The keyword to search for.
 * @return The index of the first occurrence of the keyword, or -1 if the keyword is not found.
 */
fun firefighterSearch(word: List<String>, keyword: String): Int {

    var index = -1
    var found = false

    for ((i, w) in word.withIndex()) {
        if (w == keyword) {
            index = i
            found = true
            break  // Add the break statement here to stop searching after finding the first occurrence
        }
    }

    return index
}