open System

let n = stdin.ReadLine() |> int
let S = [for _ in 1..n -> stdin.ReadLine().ToCharArray() |> Array.countBy id |> Map ]

let a = "abcdefghijklmnopqrstuvwxyz"

for c in a do
    let count = List.min [ for counter in S -> if counter.ContainsKey c then Map.find c counter else 0 ]
    Array.init count (fun _ -> c)
    |> String
    |> printf "%s"

printfn ""