Upated Trie and Tree