#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast", "unroll-loops", "omit-frame-pointer", "inline")
void dfs(vector<vector<int> > &adj, int &cnt, char *ans, vector<int> &t,
         int now) {
  ans[cnt++] = char(now + 'a');
  t[now] = 0;
  for (int i = 0; i < 26; i++) {
    if (adj[now][i] == 1) {
      dfs(adj, cnt, ans, t, i);
    }
  }
  return;
}
int main() {
  int n, cnt = 0;
  string s;
  char ans[26];
  vector<vector<int> > adj(26, vector<int>(26, 0));
  vector<int> indeg(26, 0);
  vector<int> t(26, 0);
  cin >> n;
  while (n--) {
    cin >> s;
    int i = 0;
    if (s[1] == '\0') {
      t[s[0] - 'a'] = 1;
      continue;
    }
    for (i = 1; s[i] != '\0'; ++i) {
      if (adj[s[i - 1] - 'a'][s[i] - 'a'] == 0) {
        adj[s[i - 1] - 'a'][s[i] - 'a'] = 1;
        t[s[i] - 'a'] = 1;
        t[s[i - 1] - 'a'] = 1;
        indeg[s[i] - 'a'] += 1;
      }
    }
  }
  for (int i = 0; i < 26; ++i) {
    if (t[i] == 1 && indeg[i] == 0) dfs(adj, cnt, ans, t, i);
  }
  ans[cnt] = '\0';
  printf("%s\n", ans);
  return 0;
}
