#include <bits/stdc++.h>
using namespace std;
template <typename T>
T nextInt() {
  T x = 0, p = 1;
  char ch;
  do {
    ch = getchar();
  } while (ch <= ' ');
  if (ch == '-') {
    p = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + (ch - '0');
    ch = getchar();
  }
  return x * p;
}
const int maxN = (int)3e2 + 10;
const int INF = (int)1e9;
const int mod = (int)1e9 + 7;
const long long LLINF = (long long)1e15;
set<int> g[maxN];
int deg[maxN];
int have[maxN];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    string s;
    cin >> s;
    for (int j = 0; j < s.length(); ++j) {
      have[s[j] - 'a'] = true;
    }
    for (int j = 0; j + 1 < s.length(); ++j) {
      int a = s[j] - 'a';
      int b = s[j + 1] - 'a';
      if (g[a].count(b)) continue;
      g[a].insert(b);
      deg[b]++;
    }
  }
  queue<int> q;
  for (int i = 0; i < 26; ++i) {
    if (have[i] && deg[i] == 0) {
      q.push(i);
      while (!q.empty()) {
        int v = q.front();
        have[v] = false;
        q.pop();
        putchar(v + 'a');
        for (int x : g[v]) {
          --deg[x];
          if (deg[x] == 0) {
            q.push(x);
          }
        }
      }
    }
  }
  return 0;
}
