#include<iostream>
#include<sstream>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<algorithm>
#include<numeric>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>

using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(c).size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define all(c) (c).begin(),(c).end()
#define mp make_pair
#define pb push_back
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e12,EPS=1e-9;

int n,m;
string in[10],d[10][10],ans[10][1<<10];

void MIN(string &a,string b){
	if(a.empty()||a.size()>b.size()||a.size()==b.size()&&a>b)a=b;
}
string solve(){
	rep(i,n)rep(j,1<<n)ans[i][j].clear();
	rep(i,n)ans[i][1<<i]=in[i];
	rep(j,1<<n)rep(i,n)if(j&1<<i)rep(k,n)if(!(j&1<<k))
	MIN(ans[k][j^1<<k],ans[i][j]+d[i][k]);
	string ret;
	rep(i,n)MIN(ret,ans[i][(1<<n)-1]);
	return ret;
}
int main()
{
	while(scanf("%d",&m),m){
		string s[10];
		rep(i,m)cin>>s[i];
		sort(s,s+m); m=unique(s,s+m)-s;
		bool con[10]={0};
		rep(i,m)rep(j,m)if(i!=j)if(s[i].find(s[j])!=string::npos)con[j]=1;
		n=0; rep(i,m)if(!con[i])in[n++]=s[i];
		
		rep(i,n)rep(j,n){
			int a=in[i].size(),b=in[j].size();
			for(int l=min(a,b);l>=0;l--){
				rep(k,l)if(in[i][a-l+k]!=in[j][k])goto NG;
				d[i][j]=in[j].substr(l); break;
				NG:;
			}
		}
		cout<<solve()<<endl;
	}
	return 0;
}