An efficient trie implementation.