#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 15;
const long long int inf = 1e18;
vector<long long int> a[30];
vector<long long int> vis(30);
string ans;
vector<long long int> root(30);
void dfs(long long int u) {
  vis[u] = true;
  ans += (u + 'a');
  for (auto v : a[u]) {
    if (!vis[v]) dfs(v);
  }
}
void solve() {
  long long int n;
  cin >> n;
  map<long long int, long long int> mp;
  for (long long int i = 1; i <= n; i++) {
    string s;
    cin >> s;
    for (auto x : s) mp[x - 'a']++;
    long long int len = s.size();
    for (long long int j = 1; j < len; j++)
      a[s[j - 1] - 'a'].push_back(s[j] - 'a'), root[s[j] - 'a'] = 1;
    for (long long int j = 0; j + 1 < len; j++)
      a[s[j] - 'a'].push_back(s[j + 1] - 'a');
  }
  for (auto x : mp) {
    if (vis[x.first] == 0 and !root[x.first]) dfs(x.first);
  }
  cout << ans;
}
void debug(long long int tt) {}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
}
