#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1E-7;
const long long INF = 1E+9;
const long double pip = 3.14159265358979323846;
long long binpow(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res = (res * a);
    a = (a * a);
    n >>= 1;
  }
  return res;
}
long long C(long long n, long long k) {
  long double res = 1;
  for (int i = 1; i <= k; ++i) res = res * (n - k + i) / i;
  return (long long)(res + 0.01);
}
long long gcd(long long a, long long b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
struct node {
  bool t;
  char c;
  int l, r;
};
int main() {
  int n;
  vector<node> a(30);
  for (int i = 0; i < 30; i++) {
    a[i].l = -1;
    a[i].r = -1;
    a[i].t = false;
    a[i].c = 'a' + i;
  }
  cin >> n;
  string s, ans = "";
  for (int i = 0; i < n; i++) {
    cin >> s;
    for (int i = 0; i < s.length(); i++) {
      a[s[i] - 'a'].t = true;
      if (i > 0) {
        a[s[i] - 'a'].l = int(s[i - 1] - 'a');
      }
      if (i < s.length() - 1) {
        a[s[i] - 'a'].r = int(s[i + 1] - 'a');
      }
    }
  }
  int it, last;
  for (int i = 0; i < 30; i++) {
    if (a[i].t) {
      it = i;
      while (a[it].l >= 0) {
        it = a[it].l;
      }
      while (a[it].r >= 0) {
        ans += a[it].c;
        a[it].l = -1;
        a[it].t = false;
        last = it;
        it = a[it].r;
        a[last].r = -1;
      }
      ans += a[it].c;
      a[it].t = false;
      a[it].l = -1;
      a[it].r = -1;
    }
  }
  cout << ans;
  return 0;
}
