inp = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')
N = inp.shift() * 1
o = {}
for (i=0; i<26; i++) {
    o[String.fromCharCode(97 + i)] = 50
}
for (i=0; i<N; i++) {
    s = inp[i]
    t = {}
    for (j=0;j<s.length;j++) {
        if (!t[s[j]]) t[s[j]] = 0
        t[s[j]] += 1
    }
    for (j=0; j<26; j++) {
        c = String.fromCharCode(97 + j)
        if (t[c] && o[c] > t[c]) {
            o[c] = t[c]
        }
        if (!t[c]) {
            o[c] = 0
        }
    }
}
ans = ''
for (i=0; i<26; i++) {
    c = String.fromCharCode(97 + i)
    while (o[c] > 0) {
        ans += c
        o[c] -= 1
    } 
}
console.log(ans)
