a simple trie for dictionary