#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  getline(cin, s);
  vector<vector<int>> mas(n);
  map<int, bool> mp;
  for (int i = 0; i < n; i++) {
    getline(cin, s);
    for (int j = 0; j < s.size(); j++) {
      mas[i].push_back((int)(s[j] - 'a'));
      mp[mas[i][j]] = true;
    }
  }
  {
    set<vector<int>> st(mas.begin(), mas.end());
    mas = vector<vector<int>>(st.begin(), st.end());
  }
  vector<pair<int, int>> mat(26, pair<int, int>(-1, -1));
  for (int i = 0; i < mas.size(); i++) {
    for (int j = 0; j < mas[i].size(); j++) {
      if (mas[i].size() == 1) {
        mat[mas[i][j]] = max(make_pair(-1, -1), mat[mas[i][j]]);
        continue;
      }
      if (j == 0) {
        mat[mas[i][j]].second = mas[i][j + 1];
        mat[mas[i][j + 1]].first = mas[i][j];
        continue;
      }
      if (j == mas[i].size() - 1) {
        mat[mas[i][j]].first = mas[i][j - 1];
        mat[mas[i][j - 1]].second = mas[i][j];
        continue;
      }
      mat[mas[i][j]] = make_pair(mas[i][j - 1], mas[i][j + 1]);
      mat[mas[i][j - 1]].second = mas[i][j];
      mat[mas[i][j + 1]].first = mas[i][j];
    }
  }
  vector<bool> used(26);
  deque<int> res;
  for (auto it = mp.begin(); it != mp.end(); it++) {
    int tmp = it->first;
    if (!it->second) continue;
    vector<int> kostyl;
    for (int element = tmp; element != -1; element = mat[element].first) {
      kostyl.push_back(element);
    }
    for (int jfg = kostyl.size() - 1; jfg >= 0; jfg--) {
      res.push_back(kostyl[jfg]);
      mp[kostyl[jfg]] = false;
    }
    for (int element = mat[tmp].second; element != -1;
         element = mat[element].second) {
      res.push_back(element);
      mp[element] = false;
    }
  }
  for (int it : res) {
    cout << (char)(it + 'a');
  }
  return 0;
}
