#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 6;
int nextt[N];
int n;
int deg[N];
int exists[N];
string ans = "";
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    string x;
    cin >> x;
    for (int j = 0; j < x.length() - 1; j++) {
      exists[x[j] - 'a' + 1] = 1;
      if (nextt[x[j] - 'a' + 1] == 0)
        nextt[x[j] - 'a' + 1] = (x[j + 1] - 'a' + 1);
      deg[x[j + 1] - 'a' + 1] = 1;
    }
    exists[x[x.length() - 1] - 'a' + 1] = 1;
  }
  for (int i = 1; i <= 26; i++) {
    if (deg[i] == 0 and exists[i]) {
      int cur = i;
      while (cur != 0) {
        ans.push_back(char('a' + cur - 1));
        cur = nextt[cur];
      }
    } else {
      if (exists[i]) {
        assert(deg[i] == 1);
      }
    }
  }
  cout << ans;
}
