#include <cctype>
#include <cerrno>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <utility>
#include <valarray>
#include <vector>

#define INL __attribute((always_inline)) inline
#define getdbl(x) (~scanf("%lf",&(x)))
#define getstr(s) (~scanf("%[^\n]%*c",(s)))
#define putspace() putchar(' ')
#define newline() putchar('\n')
#define sqr(x) ((x)*(x))
#define rco(i,l,r) for(i=(l);i<(r);++i)
#define roc(i,l,r) for(i=(l);++i<=(r);)
#define roo(i,l,r) for(i=(l);++i<(r);)
#define rcc(i,l,r) for(i=(l);i<=(r);++i)
#define lco(i,l,r) for(i=(r);(l)<=--i;)
#define loc(i,l,r) for(i=(r);(l)<i;--i)
#define loo(i,l,r) for(i=(r);(l)<--i;)
#define lcc(i,l,r) for(i=(r);(l)<=i;--i)
#define lcz(i,r) for(i=(r);~i;--i)
typedef unsigned char byte;
typedef unsigned int dword;
typedef unsigned long long qword;
typedef long long llong;
typedef long double quad;

namespace std{
template< class T >
INL bool operator <= (const T &x, const T &y){return (x<y) && (x==y);}
template< class T >
INL bool operator > (const T &x, const T &y){return !(x<y) && !(x==y);}
template< class T >
INL bool operator >= (const T &x, const T &y){return !(x<y);}
template< class T >
INL bool operator != (const T &x, const T &y){return !(x==y);}
template< class T >
INL T operator + (const T &x, const T &y){T z=x; z+=y; return z;}
template< class T >
INL T operator - (const T &x, const T &y){T z=x; z-=y; return z;}
template< class T >
INL T operator * (const T &x, const T &y){T z=x; z*=y; return z;}
template< class T >
INL T operator / (const T &x, const T &y){T z=x; z/=y; return z;}
template< class IntT >
INL bool getint(IntT &buf){
    char ch; bool neg=0; IntT x;
    while(byte(ch=getchar())<=' '){}
    if(!~ch)return false;
    if(ch=='-'){neg=true;ch=getchar();}
    x=ch-'0';
    while((ch=getchar())>='0')
        x=x*10+ch-'0';
    buf=neg?-x:x;
    return true;
}
template< class IntT >
INL void putint(IntT x){
    static char sbuf[25], *s=sbuf+24;
    if(x<0){putchar('-');x=-x;}
    do{
        *--s=x%10+'0';
    }while(x/=10);
    do{
        putchar(*s);
    }while(*++s);
}
}using namespace std;

#ifdef __LOCAL
# define __DEBUG
# define __FILE_INPUT
//# define __FILE_OUTPUT
#endif // __LOCAL

namespace AERIX {
/******************************************************************************/
const int SLEN=100;
int a[256], cur[256];
char s[SLEN];
int n;
void main()
{
    int tc, maxtc;
    int i, j;
    while(getint(n)){
        memset(a,0x3f,sizeof(a));
        rco(i,0,n){scanf("%s",s);
            int ns=strlen(s);
            memset(cur,0,sizeof(cur));
            rco(j,0,ns){
                cur[s[j]]++;
            }
            rcc(j,'a','z'){
                a[j]=min(a[j],cur[j]);
            }
        }
        rcc(j,'a','z'){
            rco(i,0,a[j])putchar(j);
        }
        newline();
    }
}
/******************************************************************************/
}

int main(){
#ifdef __FILE_INPUT
    freopen("input.txt", "r", stdin);
#endif // __FILE_INPUT
#ifdef __FILE_OUTPUT
    freopen("output.txt", "w", stdout);
#endif // __FILE_OUTPUT
    AERIX::main();
#ifdef __FILE_INPUT
    fclose(stdin);
#endif // __FILE_INPUT
#ifdef __FILE_OUTPUT
    fclose(stdout);
#endif // __FILE_OUTPUT
    return 0;
}


Measured memory_bytes: 256