#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
string v[26];
long long int cnt[26];
long long int cnt1[26];
long long int marked[26];
string ans = "";
void DFS(long long int i) {
  if (marked[i]) return;
  marked[i] = -1;
  string str = v[i];
  long long int j, cur;
  char ch = i + 'a';
  ans += ch;
  for (j = 1; j < str.length(); j++) {
    cur = str[j] - 'a';
    if (v[cur] != "" && v[cur].length() > str.length() - j) {
      DFS(cur);
      return;
    }
    marked[cur] = -1;
    ch = cur + 'a';
    ans += ch;
  }
  return;
}
void solve() {
  long long int n, i, m = 0, q = 0, mx = -20000000000000000,
                      mn = 20000000000000000, k = 0, j = 0, c = 0, d = 0, t = 0,
                      sm = 0, pdt = 1, l = 0, r = 0;
  cin >> n;
  memset(marked, 0, sizeof(marked));
  memset(cnt, 0, sizeof(cnt));
  string str;
  for (i = 0; i < 26; i++) v[i] = "";
  for (j = 0; j < n; j++) {
    cin >> str;
    d = str[0] - 'a';
    cnt1[d] = 1;
    if (v[d].length() < str.length()) {
      for (i = v[d].length(); i < str.length(); i++) cnt[str[i] - 'a']++;
      v[d] = str;
    }
  }
  vector<long long int> start;
  for (i = 0; i < 26; i++) {
    if (cnt1[i] == 1 && cnt[i] == 1) start.push_back(i);
  }
  for (i = 0; i < start.size(); i++) {
    if (marked[start[i]]) continue;
    DFS(start[i]);
  }
  cout << ans << endl;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
