#include <cstdio>
#include <vector>
#include <cstring>
#include <set>
#include <algorithm>
using namespace std;

int in[100];

struct cmp {
	bool operator() ( const int &a, const int &b ) {
		return in[a] < in[b] || in[a] == in[b] && a < b;
	}
};

int n;
int bio[100], imam[100], dp[100], len[110];
char niz[110][20];

set <int, cmp> S;
vector <int> V;
vector <int> U[100];
vector <int> I[100];

bool cmp1( const int &a, const int &b ) {
	return dp[a] < dp[b];
}

int main( void ) {
	scanf( "%d", &n );
	for( int i = 0; i < n; ++i ) {
		scanf( "%s", &niz[i] );
		len[i] = strlen( niz[i] );
		
		for( int j = 0; j < len[i]; ++j ) {
			if( bio[niz[i][j]-'a'] ) continue;
			V.push_back( niz[i][j]-'a' ); 
			bio[niz[i][j]-'a'] = 1;
		}
	}
	
	for( int i = 0; i < n-1; ++i ) {
		for( int j = 0; j < min( len[i], len[i+1] ); ++j ) {
			if( niz[i][j] == niz[i+1][j] ) continue;
			int a = niz[i][j]-'a';
			int b = niz[i+1][j]-'a';
			
			U[b].push_back(a);
			I[a].push_back(b);
			++in[b];
			
			break;
		}
	}
 	
 	for( int i = 0; i < V.size(); ++i ) S.insert( V[i] );
 	
 	for( ; S.size(); ) {
		int sad = *S.begin();
		S.erase( S.begin() );
		
		if( in[sad] ) { printf( "!\n" ); return 0; }
		
		for( int i = 0; i < U[sad].size(); ++i ) dp[sad] = max( dp[sad], dp[ U[sad][i] ]+1 );
		for( int i = 0; i < I[sad].size(); ++i ) { S.erase( I[sad][i] ); --in[I[sad][i]]; S.insert( I[sad][i] ); }
	}
 	
 	for( int i = 0; i < V.size(); ++i ) {
			if( imam[ dp[V[i]] ] ) { printf( "?\n" ); return 0; }
			++imam[ dp[V[i]] ];
	}
 	
 	sort( V.begin(), V.end(), cmp1 );
 	for( int i = 0; i < V.size(); ++i ) printf( "%c", V[i]+'a' );
 	printf( "\n" );
 	
	return 0;
}
