Trie implementation to search words from dictionary with wild card characters