import qualified Data.Vector as V
import qualified Data.ByteString.Char8 as B
import Data.List

solve :: V.Vector String -> String
solve xss = V.foldl' step (V.head xss) (V.tail xss)
        where
            step :: String -> String -> String
            step [] _ = []
            step (x:xs) ys
                | x `elem` ys = x : step xs (delete x ys)
                | otherwise = step xs ys

main = do
    n <- readLn :: IO Int
    xss <- V.replicateM n (B.unpack . B.sort <$> B.getLine)
    putStrLn $ solve xss