#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
int n;
string s[105];
int has[105][30];
int to[105][105];
char used[105];
vector<int> component;
void dfs(int v) {
  used[v] = 1;
  for (int i = 0; i < n; i++)
    if (used[i] == 0 && to[v][i] != -1) dfs(i);
  component.push_back(v);
}
void solve() {
  string ans = "";
  string now;
  for (int i = component.size() - 1; i >= 0; i--) {
    int id = component[i];
    now = s[id];
    if (ans.size() == 0) {
      ans = now;
      continue;
    }
    for (int j = 0; j < ans.size(); j++) {
      int l = ans[j] - 'a';
      int place = has[id][l];
      if (place != -1) {
        string tmp;
        if (place >= j) {
          tmp = now;
          for (int k = j + now.size() - place; k < ans.size(); k++)
            tmp += ans[k];
        } else {
          tmp = ans;
          for (int k = place + ans.size() - j; k < now.size(); k++)
            tmp += now[k];
        }
        ans = tmp;
        break;
      }
    }
  }
  cout << ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    for (int j = 0; j < 26; j++) has[i][j] = -1;
    for (int j = 0; j < s[i].size(); j++) has[i][s[i][j] - 'a'] = j;
  }
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      to[i][j] = to[j][i] = -1;
      for (int l = 0; l < 26; l++)
        if (has[i][l] != -1 && has[j][l] != -1) {
          to[i][j] = to[j][i] = l;
          break;
        }
    }
  for (int i = 0; i < n; i++)
    if (used[i] == 0) {
      component.clear();
      dfs(i);
      solve();
    }
  return 0;
}
