Completed longest common substring