#include <bits/stdc++.h>
using namespace std;
int af[333];
bool p[333];
bool hp[333];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (int j = 0; j + 1 < s.size(); j++) {
      af[s[j]] = s[j + 1];
      hp[s[j + 1]] = true;
      p[s[j]] = true;
    }
    p[s.back()] = true;
  }
  for (int i = 0; i < 333; i++) {
    if (p[i] && !hp[i]) {
      char c = i;
      while (c) {
        cout << c;
        c = af[c];
      }
    }
  }
  return 0;
}
