4 人解决，4 人已尝试。
9 份提交通过，共有 26 份提交。
7.0 EMB 奖励。
单点时限: 1.0 sec
内存限制: 256 MB
Mr. Panda loves fantastic beasts, he is going to use a magic spell to figure out where to find them. Given $N$ strings $S_1, S_2, \ldots, S_N$ where $S_i$ only contains lowercase alphabet letters, the magic spell is the shortest string which is only contained in the first string as a substring. If there is at least one solution, output the lexicographically smallest one.
If there is no solution, output
First line contains an integer $N$ $(1 \le N \le 50~000)$ which is the number of strings.
Following is $N$ lines, each line has a non-empty string $S_i$ which only contains lowercase alphabet letters.
The dataset guarantees $N \le |S_1| + |S_2| + \ldots + |S_N| \le 250~000$.
Output the answer string or
2 aba bab
3 qnu cvbb bnu
3 a aa aaa