n = io.read("*n", "*l")
t = {}
for i = 1, n do
    u = {}
    for j = 0, 25 do u[string.char(97 + j)] = 0 end
    s = io.read()
    len = string.len(s)
    for j = 1, len do
        a = string.sub(s, j, j)
        u[a] = u[a] + 1
    end
    for j = 0, 25 do
        moji = string.char(97 + j)
        if(t[moji] == nil) then t[moji] = u[moji] else t[moji] = math.min(t[moji], u[moji]) end
    end
end
for i = 0, 25 do
    moji = string.char(97 + i)
    if(t[moji] ~= nil) then
        for j = 1, t[moji] do
            io.write(moji)
        end
    end
end
io.write("\n")