#include <bits/stdc++.h>
const long long mod = (long long)1e9 + 7;
const int maxn = (int)1e6 + 2;
long long inf = 1LL << 60;
const double eps = 1e-9;
double pi = 3.14159265359;
using namespace std;
template <class N>
inline void read(N &n) {
  N x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = 10 * x + ch - '0';
    ch = getchar();
  }
  n = x * f;
}
pair<int, int> d[100];
int was[100];
int main() {
  int n;
  cin >> n;
  fill(d, d + 26, pair<int, int>(-1, -1));
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (int i = 0; i < s.size(); i++) {
      if (!i && i + 1 < s.size())
        d[s[i] - 'a'].second = s[i + 1] - 'a';
      else if (i && i + 1 < s.size())
        d[s[i] - 'a'] = {s[i - 1] - 'a', s[i + 1] - 'a'};
      else if (i)
        d[s[i] - 'a'].first = s[i - 1] - 'a';
      was[s[i] - 'a'] = 1;
    }
  }
  vector<int> ans;
  for (int i = 0; i < 26; i++) {
    if (!was[i]) continue;
    int k = i;
    while (d[k].first != -1) {
      k = d[k].first;
    }
    while (k != -1) {
      ans.push_back(k);
      was[k] = 0;
      k = d[k].second;
    }
    if (was[i]) ans.push_back(i);
  }
  for (int i = 0; i < ans.size(); i++) putchar(ans[i] + 'a');
  return 0;
}
