local n=io.read("n","l")

local cable={}
for i=1,26 do
    cable[i]=51
end

local sable={}
for i=1,n do
    for j=1,26 do
        sable[j]=0
    end
    for _,c in utf8.codes(io.read()) do
        sable[c-96]=sable[c-96]+1
    end
    for j=1,26 do
        cable[j]=math.min(cable[j],sable[j])
    end
end

local kaibunsho=""
for i=1,26 do
    kaibunsho=kaibunsho..string.char(i+96):rep(cable[i])
end
print(kaibunsho)