Revert "Revert "Trie""

This reverts commit 84dc1e48162050ae79a20653c789c5d7cf9c49fa.