#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  vector<string> v(N);
  for (int c = 0; c < N; c++) {
    cin >> v[c];
  }
  while (v.size() > 1) {
    bool change = false;
    vector<string> v2;
    char choice = '0';
    for (char car = 'a'; car <= 'z'; car++) {
      int found = 0;
      for (int c = 0; c < v.size(); c++) {
        for (int c2 = 0; c2 < v[c].size(); c2++) {
          if (v[c][c2] == car) {
            found++;
            break;
          }
        }
      }
      if (found > 1) {
        choice = car;
        break;
      }
    }
    if (choice == '0') {
      for (int c = 0; c < v.size(); c++) {
        cout << v[c];
      }
      return 0;
    }
    string prefix = "";
    string suffix = "";
    for (int c = 0; c < v.size(); c++) {
      for (int c2 = 0; c2 < v[c].size(); c2++) {
        if (v[c][c2] == choice) {
          if (c2 > prefix.size()) {
            prefix = v[c].substr(0, c2);
          }
          if (v[c].size() - c2 > suffix.size()) {
            suffix = v[c].substr(c2 + 1);
          }
          break;
        }
        if (c2 + 1 == v[c].size()) {
          v2.push_back(v[c]);
        }
      }
    }
    v2.push_back(prefix + string(1, choice) + suffix);
    v.resize(v2.size());
    copy(v2.begin(), v2.end(), v.begin());
  }
  for (int c = 0; c < v.size(); c++) cout << v[c];
}
