#include <bits/stdc++.h>
using namespace std;
int n;
int p[30], f[30], u[30];
void d(int i) {
  if (i >= 0) {
    cout << (char)(i + 'a');
    d(f[i]);
  }
}
int main() {
  cin >> n;
  for (int i = 0; i < 30; i++) {
    p[i] = -1;
    f[i] = -1;
  }
  string s;
  for (int i = 0; i < n; i++) {
    cin >> s;
    u[s[0] - 'a'] = 1;
    for (int j = 1; j < s.length(); j++) {
      p[s[j] - 'a'] = s[j - 1] - 'a';
      f[s[j - 1] - 'a'] = s[j] - 'a';
      u[s[j] - 'a'] = 1;
    }
  }
  for (int i = 0; i < 26; i++) {
    if (p[i] == -1 && u[i]) d(i);
  }
  cout << '\n';
  return 0;
}
