Longest common substring lenth and subtring printer