#include <iostream>
#include <vector>
#include <algorithm>
#include <array>
#include <set>
#include <map>
#include <queue>
#include <tuple>
#include <unordered_set>
#include <unordered_map>
#include <functional>
#include <cassert>
#define repeat(i, n) for (int i = 0; (i) < int(n); ++(i))
#define repeat_from(i, m, n) for (int i = (m); (i) < int(n); ++(i))
#define repeat_reverse(i, n) for (int i = (n)-1; (i) >= 0; --(i))
#define repeat_from_reverse(i, m, n) for (int i = (n)-1; (i) >= int(m); --(i))
#define whole(f, x, ...) ([&](decltype((x)) whole) { return (f)(begin(whole), end(whole), ## __VA_ARGS__); })(x)
#define unittest_name_helper(counter) unittest_ ## counter
#define unittest_name(counter) unittest_name_helper(counter)
#define unittest __attribute__((constructor)) void unittest_name(__COUNTER__) ()
using ll = long long;
using namespace std;
template <class T> inline void setmax(T & a, T const & b) { a = max(a, b); }
template <class T> inline void setmin(T & a, T const & b) { a = min(a, b); }
template <typename X, typename T> auto vectors(X x, T a) { return vector<T>(x, a); }
template <typename X, typename Y, typename Z, typename... Zs> auto vectors(X x, Y y, Z z, Zs... zs) { auto cont = vectors(y, z, zs...); return vector<decltype(cont)>(x, cont); }

bool is_suffix(string const & a, string const & b) {
    if (a.length() > b.length()) return false;
    return b.compare(b.length() - a.length(), a.length(), a) == 0;
}
void setshort(string & a, string const & b) {
    if (a.empty() or b.length() < a.length() or (a.length() == b.length() and b < a)) {
        a = b;
    }
}

int main() {
assert (string("puyopuyo").find("yop") != string::npos);
assert (string("puyopuyo").find("pop") == string::npos);
assert (string("puyopuyo").find("aaa") == string::npos);
assert (string("puyo").find("puyopuyo") == string::npos);
    while (true) {
        // input
        int n; cin >> n;
        if (n == 0) break;
        vector<string> word(n); repeat (i, n) cin >> word[i];
        // solve
        vector<string> dp(1 << n);
        function<void (string const &, int)> go = [&](string const & s, int used) {
repeat (i, n) if (used & (1 << i)) {
assert (s.find(word[i]) != string::npos);
}
            repeat (i, n) if (not (used & (1 << i))) {
                if (s.find(word[i]) != string::npos) {
                    used |= 1 << i;
                }
            }
            setshort(dp[used], s);
            repeat (i, n) if (not (used & (1 << i))) {
                repeat_from (sep, 1, word[i].length()) {
                    if (is_suffix(word[i].substr(0, sep), s)) {
                        go(s + word[i].substr(sep), used | (1 << i));
                    }
                }
            }
        };
        repeat (i, n) {
            go(word[i], 1 << i);
        }
repeat (a, 1 << n) if (not dp[a].empty()) {
repeat (i, n) if (a & (1 << i)) {
assert (dp[a].find(word[i]) != string::npos);
}
}
// repeat (iteration, 3)
        repeat (a, 1 << n) if (not dp[a].empty()) {
            repeat (b, 1 << n) {
                if ((b | a) == a) {
                    setshort(dp[b], dp[a]);
                }
            }
        }
        repeat_from (a, 1, 1 << n) {
            assert (not dp[a].empty());
            repeat (b, 1 << n) if (not dp[b].empty()) {
                if (not (a & b)) {
                    setshort(dp[a | b], dp[a] + dp[b]);
                    setshort(dp[a | b], dp[b] + dp[a]);
                }
            }
        }
repeat (a, 1 << n) if (not dp[a].empty()) {
repeat (i, n) if (a & (1 << i)) {
assert (dp[a].find(word[i]) != string::npos);
}
}
        // output
repeat (i, n) {
assert (dp[(1 << n) - 1].find(word[i]) != string::npos);
}
        cout << dp[(1 << n) - 1] << endl;
    }
    return 0;
}

Measured memory_bytes: 3100