#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <bitset>
using namespace std;

#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<pii, int> ppi;

#define INF 1000000000
#define SZ 10

string str[SZ];
int len[SZ];
int conn[SZ][SZ];

// if s1 is smaller than s2
bool str_smaller(const string s1, const string s2){
  if(s1.size() < s2.size()) return true;
  else if(s1.size() == s2.size() )return s1<s2;
  else return false;
}

int main(){
  int n;
  while(cin>>n, n){
    rep(i,n){
      cin >> str[i];
      len[i] = str[i].size();
    }

    // substring delete
    vector<bool> rm(n, false);
    rep(i,n){
      repl(j,i+1,n){
	if(rm[i] || rm[j]) continue;
	int s=i,l=j; //(shorter, longer index)
	if(len[s]>len[l]) swap(s,l);
	int reps = len[l]-len[s];
	rep(k,reps+1){
	  if(str[l].substr(k,len[s]) == str[s]){
	    rm[s]=true;
	    break;
	  }
	}
      }// rep j
    }// rep i

    vector<string> s;
    rep(i,n) if(!rm[i]) s.pb(str[i]);
    n = s.size();
    rep(i,n) len[i]=s[i].size();

    // how many words duplicate when connecting i->j
    rep(i,n){
      rep(j,n){
	if(i==j) continue;
	conn[i][j] = 0;
	int reps = min(len[i],len[j]);
	for(int k=reps; k>0; k--){
	  if(s[i].substr(len[i]-k,k) == s[j].substr(0,k)){
	    conn[i][j] = k;
	    break;
	  }
	} // rep k
      } // rep j
    } // rep i


    string infstr = "zzzzzzzzzz"; // 10
    infstr += infstr; infstr+=infstr; infstr += infstr+infstr; //120


    // DP
    // dp[bitmask(use:1,no:0)][last str idx] = "smallest string"
    vector<vector<string> > dp(1<<n, vector<string>(n, infstr));
    rep(i,n) dp[1<<i][i] = s[i];

    repl(mask,1,1<<n){ // current bit mask
      rep(i,n){ // i:new adding str idx
	if((mask>>i) &1) continue; //already used
	int nm = mask+(1<<i);  //new mask

	rep(j,n){ // j:current mask's last idx
	  if(((mask>>i) &1)) continue;//not used
	  string nw=dp[mask][j] + s[i].substr(conn[j][i]);
	  if(str_smaller(nw, dp[nm][i])) dp[nm][i]=nw;
	}
      } // rep i
    } // rep mask


    // decide answer
    string ans = infstr;
    int mask = (1<<n)-1;
    rep(i,n){
      if(str_smaller(dp[mask][i], ans)) ans =dp[mask][i];
    }
    cout << ans << endl;

  }
  return 0;
}