import java.util.Scanner

object Main {
  def solve(n: Int, S: Array[String]): String = {
    val counts = S map (_.groupBy(identity).mapValues(_.length) withDefaultValue 0) // 文字列ごと、アルファベット毎に出現個数を調べる

    (for {
      c <- 'a' to 'z'
      cnt = counts.foldLeft(Integer.MAX_VALUE)((acc, cnt) => math.min(acc, cnt(c))) // 文字毎の最小出現回数分をaからzまで出力
      _ <- 0 until cnt
    } yield c).mkString
  }

  def main(args: Array[String]): Unit = {
    val in = io.Source.fromInputStream(System.in).getLines()
    val n = in.next().toInt
    val S = Array.ofDim[String](n)
    S.indices foreach (i => S(i) = in.next())
    println(solve(n, S))
  }
}
