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_1s_2... s_{|}s| (where |s| is the length of string s) is string s_{l}s_{l} + 1... s_{r}.

String x = x_1x_2... x_{p} is lexicographically smaller than string y = y_1y_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.


-----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.

Difficulty: interview

Starter code:

Solutions:
import re
import itertools
from collections import Counter

class Task:
    strings = []
    answer = ""
	
    def getData(self):
        numberOfStrings = int(input())
        for i in range(0, numberOfStrings):
            self.strings += [input()]
	
    def solve(self):
        badStrings = set()
        for current in self.strings:
            for left in range(0, len(current)):
                for right in range(left + 1, len(current) + 1):
                    badStrings.add(current[left : right])
        alphabet = []
        for character in range(ord('a'), ord('z') + 1):
            alphabet += [chr(character)]
        
        for answerLength in range(1, 21 + 1):
            for p in itertools.product(alphabet, repeat = answerLength):
                string = re.sub("[^\w]", "", str(p));
                if string not in badStrings:
                    self.answer = string
                    return

    def printAnswer(self):
        print(self.answer)

task = Task();
task.getData();
task.solve();
task.printAnswer();


3

n = int(input())
lst = [input() for _ in range(n)]
alf = [chr(ord('a') + _) for _ in range(26)]
ans = None
for a in alf:
    if not [1 for w in lst if w.find(a) != -1]:
        ans = a
        break
if ans is not None:
    print(ans)
else:
    for a in alf:
        for b in alf:
            t = a + b
            if not [1 for w in lst if w.find(t) != -1]:
                ans = t
                break
        if ans is not None:
            print(ans)
            break


n = int(input())
t = ' '.join(input() for i in range(n))
ans = 0
for i in 'abcdefghijklmnopqrstuvwxyz':
    if not i in t:
        ans = i
        break
if not ans:
    for i in 'abcdefghijklmnopqrstuvwxyz':
        for j in 'abcdefghijklmnopqrstuvwxyz':
            if not i + j in t:
                ans = i + j
                break
        if ans: break
print(ans)

from itertools import *
alphabet="abcdefghijklmnopqrstuvwxyz";

def isValid(s, names):
    for name in names:
        if name.find(s)!=-1:
            return  False
    return True

def newProblem(names):
    for i in range(1,3):
        for s in product(alphabet, repeat=i):
            st=""
            for c in s:
                st+=c
            if isValid(st, names):
                return st

n=int(input())
names=[]
for i in range(0,n):
    name= input()
    names.append(name)
print(newProblem(names))





from itertools import *
alphabet="abcdefghijklmnopqrstuvwxyz";

def isValid(s, names):
    for name in names:
        if name.find(s)!=-1:
            return  False
    return True

def newProblem(names):
    for i in range(1,3):
        for s in product(alphabet, repeat=i):
            st=""
            for c in s:
                st+=c
            if isValid(st, names):
                return st

n=int(input())
names=[]
for i in range(0,n):
    name= input()
    names.append(name)
print(newProblem(names))





from itertools import *
alphabet="abcdefghijklmnopqrstuvwxyz";

def newProblem(names):
    for i in range(1,3):
        for s in product(alphabet, repeat=i):
            st=""
            for c in s:
                st+=c
            if names.find(st)==-1:
                return st

n=int(input())
names=""
for i in range(0,n):
    name= input()
    names+=name+ " "
print(newProblem(names))

from itertools import *
alphabet="abcdefghijklmnopqrstuvwxyz";

def newProblem(names):
    for i in range(1,3):
        for s in product(alphabet, repeat=i):
            st=""
            for c in s:
                st+=c
            if names.find(st)==-1:
                return st

n=int(input())
names=""
for i in range(0,n):
    name= input()
    names+=name+ " "
print(newProblem(names))

from itertools import *
alphabet="abcdefghijklmnopqrstuvwxyz";

def newProblem(names):
    for i in range(1,3):
        for s in product(alphabet, repeat=i):
            st="".join(s)
            if names.find(st)==-1:
                return st

n=int(input())
names=[]
for i in range(0,n):
    name= input()
    names.append(name)
namesstr=" ".join(names)
print(newProblem(namesstr))

n = int(input())
all = set()
for w in range(n):
	s = input()
	for i in range(len(s) + 1):
		for j in range(i):
			all.add(s[j:i])
cnt = 0
limit = 26
l = 1
while True:
	s = ''
	tmp = cnt
	for i in range(l):
		s = chr(ord('a') + tmp % 26) + s
		tmp //= 26
	if s not in all:
		print(s)
		break
	cnt += 1
	if cnt == limit:
		cnt = 0
		limit *= 26
		l += 1


cs1 = {chr(x) for x in range(ord('a'), ord('z') + 1)}
cs2 = {x + y for x in cs1 for y in cs1}
for i in range(int(input())):
    s = input()
    for i in range(len(s) - 1):
        cs1.discard(s[i:i + 1])
        cs2.discard(s[i:i + 2])
    cs1.discard(s[len(s) - 1:len(s)])
print(min(cs1) if cs1 else min(cs2))

I=input
s=' '.join(I()for _ in '0'*int(I()))
R=list(map(chr,range(122,96,-1)))
for i in R:
	for j in R:
		if s.count(i+j)==0:r=i+j
for i in R:
	if s.count(i)==0:r=i
print(r)

n=int(input())
l=[]
for i in range(n):
	l+=[input()]
s="+".join(l)	
q="abcdefghijklmnopqrstuvwxyz"

for i in q:
	if i not in s:
		print(i)
		break
else:		
	for i in q:
		for j in q:
			if i+j not in s:
				print(i+j)
				return

def ts(d,l):
    for i in range( len(l)):
        if d in l[i] :
            return(True)  
    return(False)
def main():
    n=int(input())
    l=[]
    d=''
    f=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
    for i in range(n):
        l.append(input())
    for j in range(20):
        for k in range (len(f)):
            for i in range(len(f)):
                d+=f[i]
                if ts(d,l):
                    d=d[:-1]
                else :
                    return(d)
            d=d[:-1]
            d+=f[k]
        
print(main())



alpha = "abcdefghijklmnopqrstuvwxyz"
n = int(input())
s = ""
for _ in range(n):
  s += input() + " "
for x in alpha:
  if x not in s:
    print(x)
    break
else:
  for i in alpha:
    for j in alpha:
      if i+j not in s:
        print(i+j)
        quit()

alpha = "abcdefghijklmnopqrstuvwxyz"
n = int(input())
s = ""
for _ in range(n):
  s += input() + " "
for x in alpha:
  if x not in s:
    print(x)
    break
else:
  for i in alpha:
    for j in alpha:
      if i+j not in s:
        print(i+j)
        quit()

n=int(input())
ch=""
while(n):
    sh=input()
    ch+=' ' +sh
    n-=1
l=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
t=False
for x in l:
    if x not in ch:
        t=True
        print(x)
        break
if not t:
    for i in range(len(l)):
        if not t:
            for j in range(len(l)):
                s=l[i]+l[j]
                if s not in ch :
                    print (s)
                    t=True
                    break


n=int(input())
alph="abcdefghijklmnopqrstuvwxyz"
ch=""
for x in range(n):
    ch+=" "+input()

def f():
    ch1=""
    j=0
    for k in range(26):
        for i in range(26):
            if ch1+alph[i] not in ch:
                print(ch1+alph[i])
                return
        ch1=alph[j]
        j+=1

f()


n=int(input())
alph="abcdefghijklmnopqrstuvwxyz"
L=[]
for x in range(n):
    L.append(input())
 
i=0
j=0
k=-1
ch=alph[0]
while 1:
    if ch not in L[i]:
        i=i+1
    else:
        j=j+1
        if (j>=26):
            if (j>0) and (j%26 ==0):
                k=k+1
            ch=alph[k]+alph[j%26]
        else:
            ch=alph[j]
        i=0
    if i==n:
        break
print(ch)
 


a=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
def fed(n):
  for j in(a) :
    for k in(a) :
      x=True
      for i in range (n):
        if (j+k in l[i])==False:
          x=True
        else :
          x=False
          break
      if x==True:
        return(j+k)
n=int(input())
l=[0]*n
for i in range (n):
  l[i]=input()
s=set([])
for i in range (n) :
  s=s|set(l[i])
if s!=set(a):
  for j in range(len(a)):
    if (a[j] in s)==False:
      print(a[j])
      break
else :
  print(fed(n))

from string import ascii_lowercase
dict={}
f=0
n=int(input())
k=0
s=""
l=[]
l1=[]
m=0
for i in range(0,n):
    s=input()
    l1.append(s)
l1 = [i.strip() for i in l1]
str="a"
while f==0:
    m=0
    for i in range(0,n):
        s=''.join(l1[i])
        if str in s:
            m=m+1
    if m!=0:
            if str[k]=="z":
                j=k
                while(str[j]=='z' and j>=0):
                    str=str.replace(str[k],"a")
                    j=j-1
                if(j==-1):
                    str=str+"a"
                    k=k+1
                else:
                    str=str[:j]+chr(ord(str[j])+1)+str[j+1:]
            else:
                str=str[:k]+chr(ord(str[k])+1)
    else:
        f=1
        break;
print(str)

n=int(input())

l=[]

for i in range(n):

	l+=[input()]

s="+".join(l)	

q="abcdefghijklmnopqrstuvwxyz"



for i in q:

	if i not in s:

		print(i)

		break

else:		

	for i in q:

		for j in q:

			if i+j not in s:

				print(i+j)

				return



# Made By Mostafa_Khaled


n = int(input())
single = []
double = []
titlesingle = []
titledouble= []
for i in range(n):
    x = input()
    l = list(x)
    titlesingle.extend(l)
    if len(x) > 1:
        for j in range(1, len(x)):
            s = x[j - 1] + x[j]
            titledouble.append(s)
sets = set(titlesingle)
setd = set(titledouble)
for i in range(26):
    s = chr(ord('a') + i)
    single.append(s)
for i in range(26):
    for j in range(26):
        s = chr(ord('a') + i) + chr(ord('a') + j)
        double.append(s)
if len(sets) < 26:
    ls = list(set(single) - sets)
    ls.sort()
    print(ls[0])
else:
    ls = list(set(double) - setd)
    ls.sort()
    print(ls[0])




from itertools import product

def generate_name(S):
    for i in range(1, 9):
        for letters in product('abcdefghijklmnopqrstuvwxyz', repeat=i):
            name = ''.join(letters)
            if all(name not in s for s in S):
                return name


print(generate_name([input() for _ in range(int(input()))]))

n = int(input())
s = ''
for i in range(n):
        s += " " + input()
se = set(s)
if len(se) <= 26:
        for i in range(97, 123):
                if chr(i) not in se:
                        print(chr(i))
                        return
else:
        for i in range(97, 123):
                for j in range(97, 123):
                        if chr(i)+chr(j) not in s:
                                print(chr(i)+chr(j))
                                return