Substring with concatenation of all words

Substring with concatenation of all words