#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:2560000000000")
using namespace std;
bool a[60];
int b[60];
int d[60];
bool c[60];
int main() {
  for (int i = 0; i < 28; i++) {
    b[i] = 50;
    d[i] = 50;
  }
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    string s;
    cin >> s;
    for (int j = 0; j < s.size(); j++) {
      a[s[j] - 'a'] = 1;
      if (j > 0) b[s[j] - 'a'] = s[j - 1] - 'a';
      if (j < s.size() - 1) {
        d[s[j] - 'a'] = s[j + 1] - 'a';
      }
    }
  }
  for (int i = 0; i < 26; i++) {
    if (a[i] == 1 && c[i] == 0) {
      if (b[i] == 50) {
        cout << char(i + 'a');
        c[i] = 1;
        int k = i;
        while (d[k] != 50) {
          cout << char(d[k] + 'a');
          c[d[k]] = 1;
          k = d[k];
        }
      }
    }
  }
  for (int i = 0; i < 26; i++) {
    if (a[i] == 1 && c[i] == 0) {
      cout << char('a' + i);
    }
  }
}
