Implement a trie (prefix tree) from scratch that supports efficient insertion, search, and prefix matching for a large dictionary of financial terms.
Implement def financial_trie(operations):, where each operation is ['insert', term], ['search', term], or ['startsWith', prefix]. Return a list of booleans for search and prefix operations in their original order. Terms and prefixes contain lowercase English letters.
An inserted term must be distinguished from a prefix that is not itself a complete term.
def financial_trie(operations):