#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>

using namespace std;

char p[101][11];
int n, ts, c, l, node;
bool is[27], out, adj[27][27], bio[27];
queue< int > nodes;

void visit( int x ){
    if( bio[x] ) return; bio[x] = 1;
    for( int i = 0; i < 27; ++i )
        if( adj[x][i] ) visit( i );
    nodes.push( x );
}

int main(){
    scanf( "%d", &n );
    for( int i = 0; i < n; ++i ) scanf( "%s", p[i] );
    for( int i = 0; i < n; ++i )
        for( int j = i+1; j < n; ++j ){
            l = min( strlen( p[i] ), strlen( p[j] ) );
            out = 0;
            for( int k = 0; k < l; ++k )
                if( p[i][k] != p[j][k] ){ adj[p[j][k] -'a'][p[i][k]-'a']  = 1; out = 1; break; }
            if( !out && strlen( p[i] ) > strlen( p[j] ) ) return printf( "!\n" ), 0;
        }
    for( int i = 0; i < n; ++i ){
        l = strlen( p[i] );
        for( int j = 0; j < l; ++j ) is[p[i][j]-'a'] = 1;
    }
    for( int i = 0; i < 27; ++i )
        for( int j = 0; j < 27; ++j )
            if( adj[i][j] && adj[j][i] ) return printf( "!\n" ), 0;
    for( int i = 0; i < 27; ++i ){
        if( !is[i] ) continue;
        ts = 0;
        for( int j = 0; j < 27; ++j ) ts += adj[j][i];
        if( !ts ) { ++c; node = i; }
    }
    if( c != 1 ) return printf( "?\n" ), 0;
    visit( node );
    while( !nodes.empty() ) { printf( "%c", 'a'+nodes.front() ); nodes.pop(); }
	return 0;
}
