Print Longest Common Substring Leetcode