#include <bits/stdc++.h>
using namespace std;
void dfs(int v) {}
void init(int n) {}
int par[26], nex[26], mark[26];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  int n, m;
  memset(par, -1, sizeof(par));
  memset(nex, -1, sizeof(nex));
  while (t--) {
    int n;
    cin >> n;
    string s;
    for (int k = 0; k < n; k++) {
      cin >> s;
      for (int i = 0; i < s.length() - 1; i++) {
        nex[s[i] - 'a'] = (s[i + 1] - 'a');
        par[s[i + 1] - 'a'] = (s[i] - 'a');
      }
      for (auto ch : s) mark[ch - 'a'] = 1;
    }
    string ans = "";
    for (int i = 0; i < 26; i++) {
      if (mark[i] && par[i] == -1) {
        int ind = i;
        ans += (ind + 'a');
        while (nex[ind] != -1) {
          ind = nex[ind];
          ans += (ind + 'a');
        }
      }
    }
    cout << ans;
  }
  return 0;
}
