#include <bits/stdc++.h>
using namespace std;
map<char, bool> vis;
vector<char> ans;
void dfs(char ch, vector<char> adj[]) {
  vis[ch] = true;
  for (auto el : adj[ch - 'a']) {
    if (!vis[el]) {
      dfs(el, adj);
    }
  }
  ans.push_back(ch);
}
int main() {
  int n;
  cin >> n;
  vector<char> adj[26];
  vector<int> mark(26);
  while (n--) {
    string s;
    cin >> s;
    for (int i = 0; i < s.length() - 1; i++) {
      adj[s[i] - 'a'].push_back(s[i + 1]);
      mark[s[i + 1] - 'a'] = 2;
    }
    if (mark[s[0] - 'a'] != 2) mark[s[0] - 'a'] = 1;
  }
  vis.clear();
  for (int i = 0; i < 26; i++) {
    if (mark[i] == 1) {
      dfs(i + 97, adj);
    }
  }
  int size = ans.size();
  for (int j = size - 1; j >= 0; --j) cout << ans[j];
  cout << "\n";
}
