#include <bits/stdc++.h>
using namespace std;
int n, nex[300], pre[300];
string ans, ret, s;
bool met[300], jest[300];
void dfs(int w) {
  met[w] = 1;
  if (pre[w] != -1 && !met[pre[w]]) dfs(pre[w]);
  ret += char(w + 'a');
  if (nex[w] != -1 && !met[nex[w]]) dfs(nex[w]);
}
int main() {
  cin >> n;
  for (int a = 0; a < 300; a++) pre[a] = -1, nex[a] = -1;
  for (int a = 1; a <= n; a++) {
    cin >> s;
    for (int b = 0; b < s.size(); b++) {
      jest[s[b] - 'a'] = 1;
      if (b > 0) pre[s[b] - 'a'] = s[b - 1] - 'a';
      if (b + 1 < s.size()) nex[s[b] - 'a'] = s[b + 1] - 'a';
    }
  }
  for (int a = 0; a < 26; a++) {
    if (!met[a] && jest[a]) {
      dfs(a);
      ans += ret;
      ret.clear();
    }
  }
  cout << ans;
  return 0;
}
