void main()
{
    long n = readln.chomp.to!long;

    long[26] cnts;
    cnts[] = 1L << 30;
    foreach (i; 0 .. n)
    {
        string s = readln.chomp;
        foreach (x; lowercase)
        {
            cnts[x-'a'] = min(cnts[x-'a'], s.count(x));
        }
    }

    string result;
    foreach (i, x; cnts)
    {
        if (x) result ~= (i + 'a').to!dchar.repeat(x).to!string;
    }

    result.writeln;
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.container;
import std.typecons;
import std.ascii;
import std.uni;