#include <bits/stdc++.h>
using namespace std;
int n;
string s;
string t[100];
int main() {
  srand(time(NULL));
  ios_base::sync_with_stdio(false);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> t[i];
  s = "";
  char c = '!';
  for (int k = 0; k < 26; k++) {
    if (c == '!') {
      int b[26];
      fill(b, b + 26, 0);
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < t[i].size(); j++) {
          if (j == 0 && b[t[i][0] - 'a'] == 0) b[t[i][0] - 'a'] = 1;
          if (j > 0) b[t[i][j] - 'a'] = 2;
        }
      }
      for (int i = 0; i < 26; i++) {
        if (b[i] == 1) c = (char)(i + (int)('a'));
      }
    }
    if (c == '!') break;
    s += c;
    char d = '!';
    for (int i = 0; i < n; i++) {
      if (t[i].size() >= 1 && t[i][0] == c) {
        t[i] = t[i].substr(1, t[i].size() - 1);
        if (t[i].size() >= 1) d = t[i][0];
      }
    }
    c = d;
  }
  cout << s << "\n";
  return 0;
}
