Get longest common substring at each position.