Codeforces Round 170 (Div. 2)
B
New Problem
Codeforces
1500
原题
← AC →
翻译中…

Coming up with a new problem isn't as easy as many people think. Sometimes it is hard enough to name it. We'll consider a title original if it doesn't occur as a substring in any titles of recent Codeforces problems.

翻译中…

You've got the titles of $*n*$ last problems — the strings, consisting of lowercase English letters. Your task is to find the shortest original title for the new problem. If there are multiple such titles, choose the lexicographically minimum one. Note, that title of the problem can't be an empty string.

翻译中…

A substring $*s*[*l*... *r*]$ $(1 ≤ *l* ≤ *r* ≤ |*s*|)$ of string $*s* = *s*_{1}*s*_{2}... *s*_{|*s*|}$ (where $|*s*|$ is the length of string $*s*$) is string $*s*_{*l*}*s*_{*l* + 1}... *s*_{*r*}$.

翻译中…

String $*x* = *x*_{1}*x*_{2}... *x*_{*p*}$ is lexicographically smaller than string $*y* = *y*_{1}*y*_{2}... *y*_{*q*}$, if either $*p* < *q*$ and $*x*_{1} = *y*_{1}, *x*_{2} = *y*_{2}, ... , *x*_{*p*} = *y*_{*p*}$, or there exists such number $*r*$ $(*r* < *p*, *r* < *q*)$, that $*x*_{1} = *y*_{1}, *x*_{2} = *y*_{2}, ... , *x*_{*r*} = *y*_{*r*}$ and $*x*_{*r* + 1} < *y*_{*r* + 1}$. The string characters are compared by their ASCII codes.

翻译中…

Input

翻译中…

The first line contains integer $*n*$ ($1 ≤ *n* ≤ 30$) — the number of titles you've got to consider. Then follow $*n*$ problem titles, one per line. Each title only consists of lowercase English letters (specifically, it doesn't contain any spaces) and has the length from 1 to 20, inclusive.

翻译中…

Output

翻译中…

Print a string, consisting of lowercase English letters — the lexicographically minimum shortest original title.

翻译中…

Note

翻译中…

In the first sample the first 9 letters of the English alphabet (a, b, c, d, e, f, g, h, i) occur in the problem titles, so the answer is letter j.

翻译中…

In the second sample the titles contain 26 English letters, so the shortest original title cannot have length 1. Title aa occurs as a substring in the first title.

翻译中…

样例

Input #1
5
threehorses
goodsubstrings
secret
primematrix
beautifulyear
Output #1
j
InputCopy OutputCopy
Input #2
4
aa
bdefghijklmn
opqrstuvwxyz
c
Output #2
ab
InputCopy OutputCopy
题目信息
题号
278B
时间限制
2 s
内存限制
256 MB
标签
暴力
字符串

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。