#include <bits/stdc++.h>
using namespace std;
double pie = 3.14159265358979323846;
long long int M = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int T, n, i, j, k = 0, m, j1, co = 0, check, mi, l, sum;
  long long int ans = 0;
  cin >> n;
  string s[n];
  for (j = 0; j < n; j++) cin >> s[j];
  long long int a[26], b[26];
  set<long long int> se;
  for (j = 0; j < 26; j++) {
    a[j] = -1;
    b[j] = -1;
  }
  for (j = 0; j < n; j++) {
    se.insert(s[j][0] - 97);
    for (k = 1; k < s[j].length(); k++) {
      se.insert(s[j][k] - 97);
      a[s[j][k] - 97] = s[j][k - 1] - 97;
      b[s[j][k - 1] - 97] = s[j][k] - 97;
    }
  }
  for (j = 0; j < 26; j++) {
    if (a[j] == -1 && se.find(j) != se.end()) {
      cout << char(j + 97);
      se.erase(j);
      long long int x = j;
      while (b[x] != -1) {
        cout << char(b[x] + 97);
        se.erase(b[x]);
        x = b[x];
      }
    }
  }
}
