#include <bits/stdc++.h>
using namespace std;
string s, ans = "";
set<int> st;
int n;
bool visited[30];
vector<int> adj[30];
vector<int> adj2[30];
void dfs(int x) {
  visited[x] = 1;
  s += (char)(x + 'a');
  for (auto it : adj[x])
    if (!visited[it]) dfs(it);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s;
    for (int i = 1; i < s.size(); i++) {
      adj[s[i - 1] - 'a'].push_back(s[i] - 'a');
      adj2[s[i] - 'a'].push_back(s[i - 1] - 'a');
    }
    for (char c : s) st.insert(c - 'a');
  }
  for (int i = 0; i < 26; i++) {
    if (adj2[i].size() || st.find(i) == st.end()) continue;
    s = "";
    dfs(i);
    ans += s;
  }
  cout << ans << endl;
}
