Find the longest common substring in the set of strings via stdin