#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, t;
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int next[26], st[26] = {0}, ok[26] = {0};
  memset(next, -1, sizeof(next));
  cin >> n;
  string ans;
  for (j = 0; j < n; j++) {
    string s;
    cin >> s;
    for (auto z : s) ok[z - 'a'] = 1;
    for (i = 0; i < s.size() - 1; i++) {
      next[s[i] - 'a'] = s[i + 1] - 'a';
      st[s[i + 1] - 'a'] = -1;
    }
  }
  for (i = 0; i < 26; i++) {
    if (ok[i] && st[i] == 0) {
      ans.push_back(i + 'a');
      j = next[i];
      while (j != -1) {
        ans.push_back(j + 'a');
        j = next[j];
      }
    }
  }
  cout << ans;
  return 0;
}
