Trie data structure is suitable for words that the order of alphabets are important. So we can consider each word as an ordered set of alphabets, for example for \'john\' we