Longest Common Substring#4802

Longest Common Substring

1 saniye
128 megabayt
Zor

strings are given. Find their common substring of maximum length. It is known that its length is positive.

Giriş

First line contains the number of strings (1 \le n \le 10^5). Each of the next lines contains a string of lowercase Latin letters. The total sum of strings' length is no more than 10^5.

Çıktı

Print the common substring of maximum length.

Örnekler

Örnek 1

Loading
Loading