Design and implement a Trie data structure to support autocomplete and search functionality for user-generated content on Roblox.
Implement trie_operations(operations). Each operation is ['insert', word], ['search', word], or ['autocomplete', prefix, k]. Return one result for each search or autocomplete operation, preserving query order. Words contain lowercase English letters, autocomplete results must be lexicographically ordered, and each word should appear at most once.
def trie_operations(operations):