#include <bits/stdc++.h>
using namespace std;
ifstream in("input.txt");
int main() {
  int n;
  cin >> n;
  vector<string> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (char c = 'a'; c <= 'z'; ++c) {
    vector<string> b;
    vector<pair<int, string> > unite;
    for (auto s : a) {
      if (s.find(c) != string::npos)
        unite.push_back(make_pair(s.find(c), s));
      else
        b.push_back(s);
    }
    if (unite.empty()) continue;
    map<int, char> fuck;
    for (auto shit : unite) {
      for (int j = 0; j < shit.second.length(); ++j)
        fuck[j - shit.first] = shit.second[j];
      string result = "";
    }
    string result = "";
    for (auto shit : fuck) result += shit.second;
    b.push_back(result);
    a = b;
  }
  for (auto s : a) cout << s;
  cout << endl;
  return 0;
}
