#include <bits/stdc++.h>
using namespace std;
const int MAXN = 107;
bool isSubstring(string &a, string &b) {
  int lenA, lenB, i, j;
  bool flag;
  lenA = a.length();
  lenB = b.length();
  if (lenA > lenB) return false;
  for (i = 0; i < lenB - lenA + 1; i++) {
    flag = true;
    for (j = 0; j < lenA; j++) {
      if (a[j] != b[i + j]) flag = false;
    }
    if (flag) return true;
  }
  return false;
}
int commonLength(string &a, string &b) {
  int ans, lenA, i, j, pos;
  bool flag;
  ans = 0;
  lenA = a.length();
  for (i = lenA - 1; i >= 0; i--) {
    if (lenA - i > b.length()) break;
    flag = true;
    pos = 0;
    for (j = 0; j < b.length(); j++) {
      if (lenA - i <= pos) break;
      if (a[i + pos] != b[pos]) {
        flag = false;
        break;
      }
      pos++;
    }
    if (flag) ans = pos;
  }
  return ans;
}
int main() {
  int n, i, j, mx, cntF, tot, ii;
  char ch;
  bool flag, used[MAXN], isSymb[MAXN][26];
  string s[MAXN], ss[MAXN], x;
  vector<int> ans;
  set<string> st;
  set<string>::iterator it;
  vector<string> v;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> x;
    st.insert(x);
  }
  n = 0;
  for (it = st.begin(); it != st.end(); it++) {
    s[n] = *it;
    n++;
  }
  for (i = 0; i < n; i++) {
    flag = true;
    for (j = 0; j < n; j++) {
      if (i == j) continue;
      if (isSubstring(s[i], s[j])) flag = false;
    }
    if (flag) v.push_back(s[i]);
  }
  n = v.size();
  for (i = 0; i < n; i++) ss[i] = v[i];
  memset(isSymb, false, sizeof(isSymb));
  for (i = 0; i < n; i++) {
    for (j = 0; j < ss[i].length(); j++) isSymb[i][ss[i][j] - 'a'] = true;
  }
  memset(used, false, sizeof(used));
  for (ch = 'a'; ch <= 'z'; ch++) {
    cntF = 0;
    tot = 0;
    for (i = 0; i < n; i++) {
      if (used[i]) continue;
      if (ss[i][0] == ch) cntF++;
      if (isSymb[i][ch - 'a']) tot++;
    }
    if ((cntF == 1) && (tot == 1)) {
      for (i = 0; i < n; i++) {
        if (used[i]) continue;
        if (ss[i][0] == ch) {
          used[i] = true;
          ans.push_back(i);
          break;
        }
      }
      break;
    }
  }
  for (ii = 0; ii < n - 1; ii++) {
    mx = 0;
    for (j = 0; j < n; j++) {
      if (used[j]) continue;
      mx = max(mx, commonLength(ss[ans[ii]], ss[j]));
    }
    if (!mx) {
      for (ch = 'a'; ch <= 'z'; ch++) {
        cntF = 0;
        tot = 0;
        for (i = 0; i < n; i++) {
          if (used[i]) continue;
          if (ss[i][0] == ch) cntF++;
          if (isSymb[i][ch - 'a']) tot++;
        }
        if ((cntF == 1) && (tot == 1)) {
          for (i = 0; i < n; i++) {
            if (used[i]) continue;
            if (ss[i][0] == ch) {
              used[i] = true;
              ans.push_back(i);
              break;
            }
          }
          break;
        }
      }
      continue;
    }
    for (j = 0; j < n; j++) {
      if (used[j]) continue;
      if (commonLength(ss[ans[ii]], ss[j]) == mx) {
        used[j] = true;
        ans.push_back(j);
        break;
      }
    }
  }
  cout << ss[ans[0]];
  for (i = 1; i < ans.size(); i++) {
    for (j = commonLength(ss[ans[i - 1]], ss[ans[i]]); j < ss[ans[i]].length();
         j++)
      cout << ss[ans[i]][j];
  }
  cout << endl;
  return 0;
}
