n = int(input())
i = 0
list = []
for i in range (n):
   list.append(str(input()))

listlist = []
lista = []
for i in range (n):
    lista.append(str(list[i].count('a')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('b')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('c')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('d')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('e')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('f')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('g')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('h')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('i')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('j')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('k')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('l')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('m')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('n')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('o')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('p')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('q')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('r')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('s')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('t')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('u')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('v')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('w')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('x')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('y')))
listlist.append(lista)
lista = []
for i in range (n):
    lista.append(str(list[i].count('z')))
listlist.append(lista)
lista = []

k = 0
listb = []
for k in range (26):
   listb.append(min(listlist[k]))
k = 0

str = ''
i = 0
k = int(listb[0])
for i in range(k):
   str = str + 'a'

i = 0
k =  int(listb[1])
for i in range(k):
   str = str + 'b'

i = 0
k = int(listb[2])
for i in range(k):
   str = str + 'c'

i = 0
k = int( listb[3])
for i in range(k):
   str = str + 'd'

i = 0
k = int( listb[4])
for i in range(k):
   str = str + 'e'

i = 0
k = int( listb[5])
for i in range(k):
   str = str + 'f'

i = 0
k = int( listb[6])
for i in range(k):
   str = str + 'g'

i = 0
k = int( listb[7])
for i in range(k):
   str = str + 'h'

i = 0
k = int( listb[8])
for i in range(k):
   str = str + 'i'

i = 0
k = int( listb[9])
for i in range(k):
   str = str + 'j'

i = 0
k = int( listb[10])
for i in range(k):
   str = str + 'k'

i = 0
k = int( listb[11])
for i in range(k):
   str = str + 'l'

i = 0
k = int( listb[12])
for i in range(k):
   str = str + 'm'

i = 0
k = int( listb[13])
for i in range(k):
   str = str + 'n'

i = 0
k = int( listb[14])
for i in range(k):
   str = str + 'o'

i = 0
k = int( listb[15])
for i in range(k):
   str = str + 'p'

i = 0
k = int( listb[16])
for i in range(k):
   str = str + 'q'

i = 0
k = int( listb[17])
for i in range(k):
   str = str + 'r'

i = 0
k = int( listb[18])
for i in range(k):
   str = str + 's'

i = 0
k = int( listb[19])
for i in range(k):
   str = str + 't'

i = 0
k = int( listb[20])
for i in range(k):
   str = str + 'u'

i = 0
k = int( listb[21])
for i in range(k):
   str = str + 'v'

i = 0
k = int( listb[22])
for i in range(k):
   str = str + 'w'

i = 0
k = int( listb[23])
for i in range(k):
   str = str + 'x'

i = 0
k = int( listb[24])
for i in range(k):
   str = str + 'y'

i = 0
k = int( listb[25])
for i in range(k):
   str = str + 'z'





print(str)

Measured memory_bytes: 3576