#include <bits/stdc++.h>
using namespace std;
int work[26][100];
int flag[26];
int ai, n, c = 0;
void f(int i) {
  int c = 0;
  char ac;
  for (int j = 0; j < n; j++) {
    if (work[i][j] >= 1) {
      for (int kk = 0; kk < 26; kk++) {
        for (int k = 0; k < 26; k++) {
          if (flag[k] == 0) {
            if ((k != i) && (work[k][j] == work[i][j] + 1)) {
              ac = k + 97;
              flag[k] = 1;
              cout << ac;
              f(k);
              c = 1;
              break;
            }
            if (c == 1) {
              c = 0;
              break;
            }
          }
        }
      }
    }
    if (c == 1) break;
  }
}
int main() {
  string a;
  vector<int> vec;
  char ac;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    for (int j = 0; j < a.size(); j++) {
      ai = a[j] - 97;
      work[ai][i] = j + 1;
    }
  }
  for (int bla = 0; bla < 26; bla++) {
    for (int i = 0; i < 26; i++) {
      if (flag[i] == 0) {
        for (int j = 0; j < n; j++) {
          if (work[i][j] == 1) {
            vec.push_back(j);
          } else if (work[i][j] > 1) {
            c = 1;
            break;
          }
        }
        if (c == 1) {
          c = 0;
          vec.clear();
        } else {
          if (vec.size() != 0) {
            ac = i + 97;
            flag[i] = 1;
            cout << ac;
            f(i);
            vec.clear();
          }
        }
      }
    }
  }
  return 0;
}
