local mmi, mma = math.min, math.max
r = {}
for i = 1, 26 do r[i] = 51 end
n = io.read("*n", "*l")
t = {}
for i = 1, n do
  s = io.read()
  for j = 1, 26 do t[j] = 0 end
  for j = 1, #s do
    v = s:sub(j, j):byte() - 96
    t[v] = t[v] + 1
  end
  for j = 1, 26 do
    r[j] =mmi(r[j], t[j])
  end
end
for i = 1, 26 do
  io.write(string.char(i + 96):rep(r[i]))
end
io.write("\n")
