#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int MAXN = 110;
int n, deg[MAXN];
vector<char> adj[MAXN], vec, voroodi[MAXN];
string s[MAXN];
bool mark[30];
void make_adj(string t) {
  for (long long i = 0; i < t.size() - 1; i++)
    adj[t[i] - 'a'].push_back(t[i + 1]),
        voroodi[t[i + 1] - 'a'].push_back(t[i]), deg[t[i + 1] - 'a']++,
        mark[t[i] - 'a'] = true;
  mark[t[t.size() - 1] - 'a'] = true;
}
void check_adj() {
  for (long long i = 0; i < 26; i++) {
    cout << (char)(i + 'a') << " : ";
    for (auto x : adj[i]) cout << x << " ";
    cout << endl;
  }
}
void check_voroodi() {
  for (long long i = 0; i < 26; i++) {
    cout << (char)(i + 'a') << " : ";
    for (auto x : voroodi[i]) cout << x << " ";
    cout << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> s[i];
    make_adj(s[i]);
  }
  for (int i = 0; i < 26; i++) {
    deg[i] = voroodi[i].size();
    if (voroodi[i].size() == 0 && mark[i]) vec.push_back((char)(i + 'a'));
  }
  vector<char> res;
  long long tmp = vec.size();
  while (!vec.empty()) {
    char x = vec[tmp - 1];
    vec.pop_back();
    res.push_back(x);
    for (auto v : adj[x - 'a']) {
      deg[v - 'a']--;
      if (!deg[v - 'a']) vec.push_back(v);
    }
    tmp = vec.size();
  }
  for (auto x : res) cout << x;
}
