Python/Trie: Refactory to oo