Ms. Reema gave some students a puzzle to solve. The students copied few characters fromthe beginning of the answer from each other. Ms. Reema needs to find the copied characters that all students have copied. In case nobody cheated, output an empty string.
Input Format
First line contains N,size of array. Next N lines contains a string in each line.
Constraints
0<=n<=1000
Length of string<=1e5
Output Format
A single String
Sample Input
4
abad abcd abapp abadcd
Sample Output
ab
Explanation
All the strings start with characters as “ab”.