#include<iostream>
#include<algorithm>
#include<vector>
#include<bitset>
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define inf (1<<29)
#define MAX (1<<10)
#define all(n) (n).begin(),(n).end()
using namespace std;

int N;
vector<string> vec;
int dp[MAX][10];
string sdp[MAX][10];
int cost[10][10];
string scost[10][10];
int last[MAX][10];

int getCost(string a,string b)
{//from a to b
  int res = inf;
  for(int i=a.size()-1,st = 0;i>=0 && st < b.size();i--,st++)
    {
      string ca = a.substr(i,a.size()-i);      
      string cb = b.substr(0,st+1);
      if(ca == cb)res = st+1; 
    }
  return res;
}

void makeCost()
{
  rep(i,N)rep(j,N)cost[i][j] = inf,scost[i][j].clear();

  rep(i,N)
    {
      rep(j,N)
	{
	  if(i == j)
	    {
	      cost[i][j] = inf;
	      scost[i][j] = "";
	      continue;
	    }
	  int receive = getCost(vec[i],vec[j]);
	  if(receive == inf)cost[i][j] = vec[j].size(),scost[i][j] = vec[j];
	  else cost[i][j] = vec[j].size()-receive,scost[i][j] = vec[j].substr(receive,vec[j].size());
	}
    }
}

void compute()
{
  if(vec.size() == 1)
    {
      cout << vec[0] << endl;
      return;
    }
  rep(i,(1<<N))rep(j,N)dp[i][j] = inf,sdp[i][j] = "{}";
  
  /*
  rep(i,N)
    {
      rep(j,N)
	{
	  cout << "from " << vec[i] << ", to " << vec[j] << " : " << cost[i][j] << " : "<< scost[i][j] << endl;
	}
      cout << endl;
    }
  */
  rep(i,N)dp[(1<<i)][i] = vec[i].size(),sdp[(1<<i)][i] = vec[i];

  int debug = inf;
  rep(state,(1<<N))
    {
      rep(cur,N)
	{
	  if(dp[state][cur] == inf)continue;
	  if(!((state>>cur) & 1))continue;
	  rep(next,N)
	    {
	      if((state>>next) & 1)continue;
	      if(cur == next)continue;

	      int nstate = state | (1<<next);
	      if(dp[nstate][next] > dp[state][cur] + cost[cur][next])
		{
		  dp[nstate][next] = dp[state][cur] + cost[cur][next];
		  sdp[nstate][next] = sdp[state][cur] + scost[cur][next];
		  last[nstate][next] = cur;
		}
	      else if(dp[nstate][next] == dp[state][cur] + cost[cur][next])
		{
		  if(vec[last[nstate][next]] > vec[cur])
		    {
		      last[nstate][next] = cur;
		    }
		  string ns = sdp[state][cur] + scost[cur][next];
		  if(sdp[nstate][next] > ns)sdp[nstate][next] = ns;
		}
	    }
	}
    }
    
  int ans = inf;
  rep(i,N)ans = min(ans,dp[(1<<N)-1][i]);
 
  string sans = "{}";
  rep(i,N)
    {
      if(ans != dp[(1<<N)-1][i])continue;
      sans = min(sans,sdp[(1<<N)-1][i]);
    }
  cout << sans << endl;
}


int main()
{
  while(cin >> N,N)
    {
      vector<string> input(N);
      bool out[N];
      bool sam[N];
      vec.clear();
      rep(i,N)cin >> input[i],out[i] = sam[i] = false;

      sort(all(input));
      input.erase(unique(all(input)),input.end());
      N = input.size();
      vec.clear();
      rep(i,N)
	{
	  bool contain = false;
	  rep(j,N)
	    {
	      if(i == j)continue;
	      if(input[j].find(input[i]) != string::npos)
		{
		  contain = true;
		  break;
		}
	    }
	  if(!contain)vec.push_back(input[i]);
	}     


      //rep(i,sm.size())vec.push_back(sm[i]);
      //rep(i,vec.size())cout << "vec = " << vec[i] << endl;
      N = vec.size();
      makeCost();
      compute();
    }
  return 0;
}

Measured memory_bytes: 2176