import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

void main() {
    int n = readint;
    string[] ss;
    for (int i = 0; i < n; i++) {
        ss ~= read!string;
    }

    char[] ans;
    foreach (c; 'a'..'z'+1) {
        int cnt = int.max;
        foreach (s; ss) {
            cnt = min(cnt, s.count(c));
            if (cnt == 0) break;
        }

        if (cnt > 0) {
            ans ~= repeat(cast(char) c, cnt).array;
        }
    }
    writeln(ans);
}
