using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Text;

class Program
{
    static void Main(string[] args)
    {
        // 入力
        var n = long.Parse(Console.ReadLine());
        string[] s = new string[n];
        for (int i = 0; i < n; i++)
        {
            s[i] = Console.ReadLine();
        }

        int[][] alph = new int[26][];
        for (int i = 0; i < alph.Length; i++)
        {
            alph[i] = new int[n];
        }

        for (int i = 0; i < s.Length; i++)
        {
            var tmp = s[i];
            for (int k = 0; k < tmp.Length; k++)
            {
                //値の判定
                switch (tmp[k])
                {
                    case 'a':
                        alph[0][i]++;
                        break;
                    case 'b':
                        alph[1][i]++;
                        break;
                    case 'c':
                        alph[2][i]++;
                        break;
                    case 'd':
                        alph[3][i]++;
                        break;
                    case 'e':
                        alph[4][i]++;
                        break;
                    case 'f':
                        alph[5][i]++;
                        break;
                    case 'g':
                        alph[6][i]++;
                        break;
                    case 'h':
                        alph[7][i]++;
                        break;
                    case 'i':
                        alph[8][i]++;
                        break;
                    case 'j':
                        alph[9][i]++;
                        break;
                    case 'k':
                        alph[10][i]++;
                        break;
                    case 'l':
                        alph[11][i]++;
                        break;
                    case 'm':
                        alph[12][i]++;
                        break;
                    case 'n':
                        alph[13][i]++;
                        break;
                    case 'o':
                        alph[14][i]++;
                        break;
                    case 'p':
                        alph[15][i]++;
                        break;
                    case 'q':
                        alph[16][i]++;
                        break;
                    case 'r':
                        alph[17][i]++;
                        break;
                    case 's':
                        alph[18][i]++;
                        break;
                    case 't':
                        alph[19][i]++;
                        break;
                    case 'u':
                        alph[20][i]++;
                        break;
                    case 'v':
                        alph[21][i]++;
                        break;
                    case 'w':
                        alph[22][i]++;
                        break;
                    case 'x':
                        alph[23][i]++;
                        break;
                    case 'y':
                        alph[24][i]++;
                        break;
                    case 'z':
                        alph[25][i]++;
                        break;
                }
            }

        }

        StringBuilder ans = new StringBuilder("");
        for (int i = 0; i < 26; i++)
        {
            var tmp = alph[i].Min();
            if (tmp != 0)
            {
                for (int k = 0; k < tmp; k++)
                {
                    switch (i)
                    {
                        case 0:
                            ans.Append("a");
                            break;
                        case 1:
                            ans.Append("b");
                            break;
                        case 2:
                            ans.Append("c");
                            break;
                        case 3:
                            ans.Append("d");
                            break;
                        case 4:
                            ans.Append("e");
                            break;
                        case 5:
                            ans.Append("f");
                            break;
                        case 6:
                            ans.Append("g");
                            break;
                        case 7:
                            ans.Append("h");
                            break;
                        case 8:
                            ans.Append("i");
                            break;
                        case 9:
                            ans.Append("j");
                            break;
                        case 10:
                            ans.Append("k");
                            break;
                        case 11:
                            ans.Append("l");
                            break;
                        case 12:
                            ans.Append("m");
                            break;
                        case 13:
                            ans.Append("n");
                            break;
                        case 14:
                            ans.Append("o");
                            break;
                        case 15:
                            ans.Append("p");
                            break;
                        case 16:
                            ans.Append("q");
                            break;
                        case 17:
                            ans.Append("r");
                            break;
                        case 18:
                            ans.Append("s");
                            break;
                        case 19:
                            ans.Append("t");
                            break;
                        case 20:
                            ans.Append("u");
                            break;
                        case 21:
                            ans.Append("v");
                            break;
                        case 22:
                            ans.Append("w");
                            break;
                        case 23:
                            ans.Append("x");
                            break;
                        case 24:
                            ans.Append("y");
                            break;
                        case 25:
                            ans.Append("z");
                            break;
                    }
                }
            }
        }

        Console.WriteLine(ans);
    }
}


Measured memory_bytes: 13396