#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

const int MAX = 35;

int n;
string s[105];
char buff[12];

int chars = 0;
bool ima[MAX];
bool bio[MAX];
bool con[MAX][MAX];
bool fail = false;

string sol;

class st {
public:
	int x;
	string alfa;

	inline st() {alfa = "";}
	inline st(int _x, string _alfa) {x = _x; alfa = _alfa;} 
};

void build(int a, int b) {
	int x = 0, k, l;

	if (fail) return;

	for(;;) {
		if (s[a][x] != s[b][x]) {
			k = s[a][x] - 'a';
			l = s[b][x] - 'a';

			if (con[l][k]) fail = true;
				
			con[k][l] = true;    
			return;
		} 
		++x;
		if (x == s[a].length() || x == s[b].length()) return;
	}
}

void solve(st x) {
     bio[x.x] = true;
	 
	 x.alfa += (char)(x.x + 'a');

	 if (x.alfa.length() == chars) {
		sol = x.alfa;
		return;
	 }
	 if (sol != "") return;

	 for(int i = 0; i < MAX; ++i) 
		if (con[x.x][i] && !bio[i]) 
			solve(st(i, x.alfa));

	 bio[x.x] = false;
}


int main(void) {
    memset(con, false, sizeof(con));
	memset(ima, false, sizeof(ima));

	scanf("%d", &n);

	for(int i = 0; i < n; ++i) {
		scanf("%s", buff);
		s[i] = buff;
		for(int j = 0; j < strlen(buff); ++j) ima[buff[j] - 'a'] = true;
	}

	for(int i = 0; i < n; ++i)
		for(int j = i + 1; j < n; ++j)
			build(i, j);

	if (fail) {
		printf("!\n");
		//system("pause");
		return 0;
	}

	for(int i = 0; i < MAX; ++i) 
		if (ima[i]) ++chars;

	for(int i = 0; i < MAX; ++i) {
		if (ima[i]) {
			memset(bio, false, sizeof(bio));           		
			solve(st(i, ""));
		}
		if (sol != "") {
			printf("%s\n", sol.c_str());
			break;
		}
	}

	if (sol == "") printf("?\n");

	//system("pause");
	return 0;
}
	
