#include <bits/stdc++.h>
using namespace std;
int xrr[] = {0, 1, -1, 0};
int yrr[] = {1, 0, 0, -1};
int main() {
  int n = 0;
  cin >> n;
  vector<int> prev(26, -1);
  vector<int> next(26, -1);
  vector<int> mymap(26, 0);
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (int i = 0; i < s.size() - 1; i++) {
      next[s[i] - 'a'] = max(next[s[i] - 'a'], s[i + 1] - 'a');
    }
    for (int i = 1; i < s.size(); i++) {
      prev[s[i] - 'a'] = max(prev[s[i] - 'a'], s[i - 1] - 'a');
    }
    for (int i = 0; i < s.size(); i++) {
      mymap[s[i] - 'a'] = 1;
    }
  }
  for (int i = 0; i < 26; i++) {
    char x = 'a' + i;
    if (mymap[i] == 1 && prev[i] == -1) {
      cout << x;
      int j = i;
      while (next[j] != -1) {
        cout << char(next[j] + 'a');
        j = next[j];
      }
    }
  }
  cout << endl;
  return 0;
}
