substrings with concatenations of all words