object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt()
  val s = List.fill(n)(sc.next())
  val m = s.map(_.toSeq.groupBy(identity).view.mapValues(_.length))
  val sb = new StringBuilder
  for (c <- 'a' to 'z') {
    val count = m.map(_.getOrElse(c, 0)).min
    sb.addAll(c.toString * count)
  }
  println(sb.toString())
}
