Searching the specific strings with trie