improve Substring With COncatenation Of ALl Words