#include <bits/stdc++.h>
using namespace std;
int a[26];
bool c[26];
bool cha[26];
int main() {
  ios::sync_with_stdio(false);
  for (int i = 0; i < 26; i++) {
    a[i] = -1;
  }
  int n;
  cin >> n;
  string s;
  for (int i = 0; i < n; i++) {
    cin >> s;
    for (auto i : s) {
      cha[i - 'a'] = 1;
    }
    for (int i = 1; i < s.size(); i++) {
      a[s[i - 1] - 'a'] = s[i] - 'a';
      c[s[i] - 'a'] = 1;
    }
  }
  string res = "";
  for (int i = 0; i < 26; i++) {
    if (cha[i] && !c[i]) {
      int temp = i;
      while (temp != -1) {
        res.push_back(temp + 'a');
        temp = a[temp];
      }
    }
  }
  cout << res << endl;
  return 0;
}
