#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int t;
  cin >> t;
  bool pr[26];
  char nxt[26];
  for (int i = 0; i < 26; i++) {
    nxt[i] = '0';
    pr[i] = false;
  }
  string s;
  for (int i = 0; i < t; i++) {
    cin >> s;
    char prev = s[0];
    int j = 1;
    for (; j < s.length(); j++) {
      pr[s[j] - 'a'] = true;
      nxt[prev - 'a'] = s[j];
      prev = s[j];
    }
    --j;
    if (nxt[s[j] - 'a'] == '0') nxt[s[j] - 'a'] = '1';
  }
  for (int i = 0; i < 26; i++) {
    if (pr[i] == false && nxt[i] != '0') {
      char j = 'a' + i;
      while (j >= 'a' && j <= 'z' && nxt[j - 'a'] != '0') {
        cout << j;
        j = nxt[j - 'a'];
      }
    }
  }
  cout << '\n';
  return 0;
}
