#include <bits/stdc++.h>
using namespace std;
int main() {
  string a;
  int n;
  cin >> n;
  vector<string> v;
  map<char, char> p, l;
  for (int i = 0; i < n; i++) {
    cin >> a;
    v.push_back(a);
  }
  for (int i = 0; i < v.size(); i++) {
    for (int j = 0; j < v[i].size(); j++) {
      if (j != v[i].size() - 1) {
        p[v[i][j]] = v[i][j + 1];
      } else if (p.find(v[i][j]) == p.end()) {
        p[v[i][j]] = '.';
      }
      if (j != 0) {
        l[v[i][j]] = v[i][j - 1];
      } else if (l.find(v[i][j]) == l.end()) {
        l[v[i][j]] = '.';
      }
    }
  }
  vector<char> w;
  for (map<char, char>::iterator it = l.begin(); it != l.end(); ++it) {
    if (it->second == '.') w.push_back(it->first);
  }
  for (int i = 0; i < w.size(); i++) {
    char w1 = w[i];
    while (w1 != '.') {
      cout << w1;
      w1 = p[w1];
    }
  }
  return 0;
}
