#include <bits/stdc++.h>

using namespace std;

string dp[11][10][1 << 10];
bool made[11][10][1 << 10] = {0};

bool isGood(string& s1, string& s2) {
	return s1 == "" || s1.size() < s2.size() || (s1.size() == s2.size() && s1 < s2);
}
void proc(string s, int i, int j, int k) {
	if ( !made[i][j][k] || isGood(s, dp[i][j][k]) ) {
		dp[i][j][k] = s;
	}
	made[i][j][k] = true;
}
string cat(string s1, string s2) {
	if (s1.size() >= s2.size()) {
		for (int i = 0; i <= s1.size()-s2.size(); ++i) {
			bool f = true;
			for (int j = 0; j < s2.size(); ++j) {
				if (s1[i+j] != s2[j]) {
					f = false;
					break;
				}
			}
			if (f) {
				return s1;
			}
		}
	}

	int len = 0;
	for (int k = min(s1.size(), s2.size()); k >= 0; --k) {
		bool f = true;
		for (int i = 0; i < k; ++i) {
			if (s1[s1.size()-k+i] != s2[i]) {
				f = false;
				break;
			}
		}
		if (f) {
			len = k;
			break;
		}
	}
	return s1 + s2.substr(len);
}

int main() {
	int N;
	while ( cin >> N, N ) {
		fill(&made[0][0][0], &made[0][0][0]+11*10*(1 << 10), false);

		string S[10];
		for (int i = 0; i < N; ++i) {
			cin >> S[i];
		}

		vector<bool> f(N, false);
		for (int i = 0; i < N; ++i) {
			for (int j = i+1; j < N; ++j) {
				if ( cat(S[j], S[i]) == S[i] ) {
					f[j] = true;
				}
			}
		}
		vector<string> s;
		for (int i = 0; i < N; ++i) {
			if (!f[i]) s.push_back(S[i]);
		}
		N = s.size();

		made[0][0][0] = true; dp[0][0][0] = "";
		for (int i = 0; i < N; ++i) {
			for (int j = 0; j < N; ++j) {
				for (int k = 0; k < (1 << N); ++k) {
					if (made[i][j][k]) {
						for (int l = 0; l < N; ++l) {
							if ((k & (1 << l)) == 0) {
								int nk = k | (1 << l);
								proc(cat(dp[i][j][k], s[l]), i+1, l, nk);
							}
						}
					}
				}
			}
		}

		string ans = "";
		for (int i = 0; i < N; ++i) {
			if ( ans == "" || isGood(dp[N][i][(1 << N)-1], ans) ) {
				ans = dp[N][i][(1 << N)-1];
			}
		}
		cout << ans << endl;
	}
}