#include<bits/stdc++.h>
using namespace std;
#define f1(a,b,c) for(int c=a;c<=b;c++)
#define f2(a,b,c) for(int c=a;c>=b;c--)
#define f3(a,b,c) for(int c=a;c;c=b)
#define so1(a,n) sort(a+1,a+n+1,mycmp);
#define so2(a,n) sort(a+1,a+n+1);
#define ll long long
#define itn int
#define ubt int 
const int twx=+100;
const int inf=0x3f3f3f3f;
ll read()
{
    ll sum=0;
    ll flag=1;
    char c=getchar();
    while(c<'0'||c>'9')
    {
        if(c=='-')
        {
            flag=-1;
        }
        c=getchar();
    }
    while(c>='0'&&c<='9')
    {
        sum=((sum*10)+c-'0');
        c=getchar();
    }
    return sum*flag;
}
int n;
char s[twx][twx];
char ans[twx];
int cnt=0;
int asd[twx][twx];
int changdu=inf;
void init()
{
	n=read();
    f1(1,n,i)
    {
        scanf("%s",s[i]);
    }
}
void work()
{
	f1(1,n,i)
	{
		int x=strlen(s[i]);
		f1(0,x-1,j)
		{
			int qwe=s[i][j]-'a';
			asd[qwe][i]++;//第i个字符串中的字母出现了多少次 
		}
	}

		f1(0,25,j)//求出第j个字符最少出现次数
		{
			changdu=inf;
			f1(1,n,k)
			{
				changdu=min(changdu,asd[j][k]);
			}
			//cout<<changdu<<endl;
			f1(1,changdu,k)
			{
				//cout<<char(j+97);
				ans[cnt++]=char(j+97);
			}
		}
}
void print()
{
	sort(ans,ans+cnt);
	cout<<ans;
}
int main()
{
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	init();
	work();
	print();
	return 0;
}