Given strings of lowercase Latin letters, your task is to determine their longest common substring.
The first line contains the integer (1 \leq K \leq 10). The following lines each contain a string of lowercase Latin letters, with each string having a length between and .
Output the longest common substring shared by all strings.
Example 1