Demonstration of trie structures in Python