11 lecturers of Khust


Submit solution

Points: 100 (partial)
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type

One day 11 lecturers from Khust gathered to test the contests and Alexander decided to make a competition. The one who finds the largest common substring among the names of lecturers will receive an OK for the task. Can you find the largest common substring among \(K\) names?

Input Specification

The first line contains one integer \(K\) \((1 \leq K \leq 10)\) --- the number of names.

Subsequent \(K\) lines contain one name, the length of which does not exceed \(10^4\).

Output Specification

The largest joint substring. If there are several answers --- print any.

Sample Input 1

3
panchak
mrpak
drshak

Sample Output 1

ak

Comments

There are no comments at the moment.