#include <bits/stdc++.h>
using namespace std;
long double EPS = 1e-9;
long long cel(long long a, long long b) { return ((a - 1) / b + 1); }
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  return (b == 0) ? a : gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
long long po(long long x, long long y) {
  long long ans = 1;
  while (y) {
    if (y & 1) {
      ans = (ans * x) % 1000000007;
    }
    y >>= 1;
    x = (x * x) % 1000000007;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, t, x, y, m, k;
  cin >> n;
  string s, ans;
  queue<int> q;
  vector<int> par(26, -1), ch(26, -1), chk(26, 0);
  for (int i = 0; i < n; i++) {
    cin >> s;
    for (int i = 0; i < s.size() - 1; i++) {
      chk[s[i] - 'a'] = 1;
      ch[s[i] - 'a'] = int(s[i + 1] - 'a');
    }
    chk[s[s.size() - 1] - 'a'] = 1;
    for (int i = 1; i < s.size(); i++) {
      chk[s[i] - 'a'] = 1;
      par[s[i] - 'a'] = int(s[i - 1] - 'a');
    }
  }
  for (int i = 0; i < 26; i++) {
    if (chk[i] && (par[i] == -1)) {
      q.push(i);
    }
  }
  char c;
  while (!q.empty()) {
    x = q.front();
    q.pop();
    c = 'a' + x;
    ans.push_back(c);
    y = ch[x];
    while (y != -1) {
      c = 'a' + y;
      ans.push_back(c);
      y = ch[y];
    }
  }
  cout << ans;
  return 0;
}
