added a method to reverse a trie