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

using namespace std;

#define FOR(i,k,n) for(int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cerr<<*i<<" "; cerr<<endl; }
inline bool valid(int x, int y, int W, int H){ return (x >= 0 && y >= 0 && x < W && y < H); }

typedef long long ll;
const int INF = 100000000;
const double EPS = 1e-8;
const int MOD = 1000000007;
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
bool comp (const string& s, const string& t) {
  if(s.size() != t.size()) return s.size() < t.size();
  return s < t;
}
string smin(const string& s, const string& t){
  if(comp(s, t)) return s;
  else return t;
}

int main(){
  int N;
  while(cin>>N && N){
    vector<string> v_(N);
    REP(i, N) cin>>v_[i];
    vector<bool> need(N, true);
    REP(i, N)REP(j, N) if(v_[i] != v_[j] && v_[i].find(v_[j]) != string::npos) need[j] = false;
    REP(i, N)REP(j, N) if(i != j && v_[i] == v_[j]) need[max(i, j)] = false;
    vector<string> v;
    REP(i, N) if(need[i]) v.push_back(v_[i]);
    N = v.size();
    string dp[1<<10][10];
    REP(i, 1<<N)REP(j, N)dp[i][j] = string(200, '~');
    REP(i, N){
      dp[1<<i][i] = v[i];
    }
    for(int S = 0; S < 1<<N; S++){
      for(int i = 0; i < N; i++){
        for(int j = 0; j < N; j++){
          if(((S >> i) & 1) && !((S >> j) & 1)){
            dp[S | (1<<j)][j] = smin(dp[S | (1<<j)][j], dp[S][i] + v[j]);
            for(int k = 1; k < min(dp[S][i].size(), v[j].size()); k++){
              if(dp[S][i].substr(dp[S][i].size() - k, k) == v[j].substr(0, k)){
                dp[S | (1<<j)][j] = smin(dp[S | (1<<j)][j], dp[S][i] + v[j].substr(k));
              }
            }
          }
        }
      }
    }
    string ans = string(200, '~');
    REP(i, N) ans = smin(ans, dp[(1<<N) - 1][i]);
    cout<<ans<<endl;
  }
  return 0;
}