#include <bits/stdc++.h>
using namespace std;
const long long inf = (1ll << 62) - 1;
const long long MOD = 1e9 + 7;
const int MAX = 2 * 1e9 + 10;
const int N = 2e5 + 5;
using namespace std;
int bPow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1ll) {
      res = 1ll * res * a % MOD;
    }
    b >>= 1;
    a = 1ll * a * a % MOD;
  }
  return res;
}
int gcd(int a, int b) {
  if (a < b) {
    swap(a, b);
  }
  if (b == 0) return a;
  return gcd(b, a % b);
}
vector<int> mpf(N, 0);
void sieve() {
  for (int i = 2; i < N; ++i) {
    if (!mpf[i])
      for (int j = 2 * i; j < N; j += i) {
        mpf[j] = i;
      }
  }
}
void solve() {
  int n;
  cin >> n;
  vector<int> edges(30, -1);
  vector<bool> insideEle(30, false), starting(30, false);
  while (n--) {
    string s;
    cin >> s;
    starting[s[0] - 'a'] = true;
    for (int i = 1; i < (int)s.size(); ++i) {
      edges[s[i - 1] - 'a'] = s[i] - 'a';
      insideEle[s[i] - 'a'] = true;
    }
  }
  string ans;
  for (int i = 0; i < 26; i++) {
    if (starting[i] and !insideEle[i]) {
      int c = i;
      while (c != -1) {
        ans += (char)(c + 'a');
        c = edges[c];
      }
    }
  }
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int tc = 1;
  while (tc--) {
    solve();
  }
  return 0;
}
