#include <bits/stdc++.h>
using namespace std;
long f[30], d[30];
long next_sym[30];
int main() {
  long n;
  for (int i = 0; i < 30; i++) f[i] = 0, d[i] = 0, next_sym[i] = -1;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (int j = 0; j < s.size(); j++) {
      f[s[j] - 'a'] = 1;
      if (j < s.size() - 1) {
        next_sym[s[j] - 'a'] = s[j + 1] - 'a';
        d[s[j + 1] - 'a'] = 1;
      }
    }
  }
  for (int i = 0; i < 30; i++)
    if ((f[i]) && (d[i] == 0)) {
      long cur = i;
      while (cur != -1) {
        char sym = cur + 'a';
        cout << sym;
        cur = next_sym[cur];
      }
    }
  return 0;
}
