adding trie in python