跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F2535. New Problem

    ID: 2541 传统题 2000ms 256MiB 尝试: 0 已通过: 0 难度: 4 上传者: 标签>枚举字符串算法思想进阶难度共享题库Codeforces英文题面题目来源题面语言

New Problem

题目描述

B. New Problem
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

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≤lr≤|s|) of string s=s1s2... s|s| (where |s| is the length of string s) is string slsl+1... sr.

String x=x1x2... xp is lexicographically smaller than string y=y1y2... yq, if either p<q and x1=y1,x2=y2,... ,xp=yp, or there exists such number r (r<p,r<q), that x1=y1,x2=y2,... ,xr=yr and xr+1<yr+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.

Examples
Input
5
threehorses
goodsubstrings
secret
primematrix
beautifulyear
Output
j
Input
4
aa
bdefghijklmn
opqrstuvwxyz
c
Output
ab
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.


题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 2180 题。保留原作者与原赛事署名。