#include <bits/stdc++.h>
using namespace std;

#define rep(i,x,y) for(int i=(x);i<(y);++i)
#define debug(x) #x << "=" << (x)

#ifdef DEBUG
#define _GLIBCXX_DEBUG
#define dump(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define dump(x)
#endif

typedef long long int ll;
typedef pair<int,int> pii;
//template<typename T> using vec=std::vector<T>;

const int inf=1<<30;
const long long int infll=1LL<<58;
const double eps=1e-9;
const int dx[]={1,0,-1,0},dy[]={0,1,0,-1};

template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec){
	os << "[";
	for (const auto &v : vec) {
		os << v << ",";
	}
	os << "]";
	return os;
}

void solve(){
    while(true){
        int n;
        cin >> n;
        if(n==0) break;

        vector<string> words(n);
        for(auto& w:words) cin >> w;
        for(auto it=words.begin(); it!=words.end();){
            if(![&]{
                for(auto it2=words.begin();it2!=words.end(); ++it2) if(it2!=it and it2->find(*it)!=string::npos){
                    it=words.erase(it);
                    return true;
                }
                return false;
            }()) ++it;
        }

        vector<vector<int>> graph(words.size(),vector<int>(words.size()));
        for(int i=0; i<words.size(); ++i) for(int j=0; j<words.size(); ++j){
            const string& w1=words[i],w2=words[j];
            int same=0;
            for(int len=0; len<=min(w1.size(),w2.size()); ++len) if(w1.substr(w1.size()-len,len)==w2.substr(0,len)) same=len;
            graph[i][j]=w2.size()-same;
        }

        const string infstr(101,'z');
        string dp[1<<10][10];
        fill_n((string*)dp,(1<<10)*10,infstr);
        for(int i=0; i<words.size(); ++i) dp[1<<i][i]=words[i];
        function<string(int,int)> rec=[&](int state,int v){
            string& res=dp[state][v];
            if(res!=infstr) return res;
            for(int u=0; u<words.size(); ++u) if(u!=v and (state>>u)&1){
                const string& tmp=rec(state&~(1<<v),u)+words[v].substr(words[v].size()-graph[u][v]);
                if(tmp.size()<res.size()) res=tmp;
                else if(tmp.size()==res.size()) res=min(res,tmp);
            }
            return res;
        };

        string ans=infstr;
        for(int i=0; i<words.size(); ++i){
            const string& tmp=rec((1<<words.size())-1,i);
            if(tmp.size()<ans.size()) ans=tmp;
            else if(tmp.size()==ans.size()) ans=min(ans,tmp);
        }
        cout << ans << endl;
    }
}

int main(){
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);
	solve();
	return 0;
}