import Control.Monad
import Data.List

main = do
    n <- readLn
    ss <- map sort <$> replicateM n getLine
    putStrLn $ solve ['a'..'z'] ss

solve [] xss = []
solve (c:cs) xss | any null xss' = []
                 | all (==c) (map head xss') = c : solve (c:cs) (map tail xss')
                 | otherwise = solve cs xss'
    where xss' = map (dropWhile (<c)) xss