import java.util.Scanner

object Main extends App{
  val sc = new Scanner(System.in)
  // val n = sc.nextInt()
  // val s = sc.nextLine()
  // val str = sc.next()

  val n = sc.nextInt()
  sc.nextLine()
  val ss = new Array[String](n)
  for(i <- 0 until n)
    ss(i) = sc.nextLine()

  val dp = new Array[Int](26)
  for(c <- ss(0))
    dp(c.toInt - 97) += 1

  for(i <- 1 until n){
    val now = ss(i)
    for(j <- 0 until 25){
      val tmp = now.count(_ == (97+j).toChar)
      dp(j) = Math.min(dp(j), tmp)
    }
  }

  var ans = ""
  for(i <- 0 until 26){
    ans += (i+97).toChar.toString * dp(i)
  }
  println(ans)
}
