Combine suffix array and trie