import Data.List as List

main :: IO ()
main = do
  n <- readLn :: IO Int
  ss <- sequence $ replicate n getLine
  putStrLn $ solve ss

solve :: [String] -> String
solve ss =
  List.sort $ foldl1 getDuplicate ss
  where
    getDuplicate xs ys =
      let
        xs' = List.sort xs
        ys' = List.sort ys
        f [] _ = []
        f _ [] = []
        f (x:xs) (y:ys) =
          if x == y
          then
            x : f xs ys
          else
            if x < y then
              f xs (y:ys)
            else
              f (x:xs) ys
      in
        f xs' ys'
