#include<iostream>
#include<vector>
#include<cmath>
#include<queue>
#include<functional>
#include<algorithm>
#include<string>
#include<set>
#include<cstring>
 
using namespace std;
 
struct edge{int to,cost;};
typedef pair<int,int> P;
const int INF=1<<15;

string make_table(string x,string y)
{
	string res=y;
	string y2=y;
	for(int i=0;i<=y.size();i++){
		y2.erase(0,1);
		string tmp=x+y2;
		if(tmp.find(x)!=string::npos && tmp.find(y)!=string::npos) res=y2;
	}
	
	return res;
}
 
int main(void)
{
	
	//cout<<make_table("abc","xyz")<<endl;
	//cout<<make_table("abc","abc")<<endl;
	//cout<<make_table("abc","bcd")<<endl;
	
	int n;
	while(cin>>n,n){
		vector<string> vs;
		string ans="";
		for(int i=0;i<n;i++){
			string tmp;
			cin>>tmp;
			bool ok=true;
			for(int j=0;j<vs.size() && ok;j++) ok=(vs[j].find(tmp)==string::npos);
			if(ok){vs.push_back(tmp); ans+=tmp;}
		}
		
		vector<int> order(vs.size());
		for(int i=0;i<order.size();i++) order[i]=i;

		vector<vector<string> > table(vs.size(),vector<string>(vs.size()));

		for(int i=0;i<vs.size();i++){
			for(int j=0;j<vs.size();j++) table[i][j]=make_table(vs[i],vs[j]);
		}		

		//int cnt=0;
		do{
			//cout<<cnt++<<endl;
			string res=vs[order[0]];
			for(int i=1;i<order.size();i++){
				res+=table[order[i-1]][order[i]];
	  		}
/*
			if(ans=="") ans=res;
			else if(ans.size()>res.size()){cout<<ans<<"->"<<res<<"(size)"<<endl; ans=res;}
			else if(ans.size()==res.size() && ans>res){cout<<ans<<"->"<<res<<"(order)"<<endl; ans=res;}
*/			
			if(ans.size()>res.size() || ans.size()==res.size() && ans>res) ans=res;
		}while(next_permutation(order.begin(),order.end()));

		cout<<ans<<endl;
	 }

	return 0;
}