import java.util.*
import kotlin.math.*

fun main() {
    val n = readLine()!!.toInt()
    val s = List(n) { readLine()!! }

    val ans = StringBuilder()
    for (i in 'a'..'z') {
        var cnt = Int.MAX_VALUE
        s.forEach { str ->
            cnt = min(cnt, str.count { it == i })
        }
        ans.append(i.toString().repeat(cnt))
    }
    println(ans.toString())
}