add lc substring with concatenation of all words