#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<bool> used(26, false), start(26, true);
  vector<int> p(26, -1);
  string s;
  for (int z = 0; z < n; z++) {
    cin >> s;
    used[s[0] - 'a'] = true;
    for (int i = 1; i < s.size(); i++) {
      used[s[i] - 'a'] = true;
      start[s[i] - 'a'] = false;
      p[s[i - 1] - 'a'] = s[i] - 'a';
    }
  }
  string ans = "";
  for (int i = 0; i < 26; i++) {
    if (used[i] && start[i]) {
      int x = i;
      ans += 'a' + i;
      while (p[x] != -1) {
        x = p[x];
        used[x] = false;
        ans += 'a' + x;
      }
    }
  }
  cout << ans;
  return 0;
}
