Given rows of lowercase Latin letters, your task is to identify the longest common substring among them.
The first line contains the integer (1 \le K \le 10). The following lines each contain one row of lowercase Latin letters, with each row having a length between and .
Output the longest common substring shared by all the rows.
1-nji mysal