#include <bits/stdc++.h>
using namespace std;
string ans = "";
char l[26], r[26];
bool pres[26] = {};
void dfs(char c) {
  if (l[c - 'a'] == '#') {
    ans += c;
    pres[c - 'a'] = 0;
    return;
  }
  dfs(l[c - 'a']);
  ans += c;
  pres[c - 'a'] = 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int test = 1;
  while (test--) {
    int n;
    cin >> n;
    for (int i = 0; i < 26; i++) {
      l[i] = '#';
      r[i] = '#';
    }
    for (int i = 0; i < n; i++) {
      string s;
      cin >> s;
      int len = s.length();
      for (int j = 0; j < len; j++) {
        pres[s[j] - 'a'] = 1;
        if (j > 0 && j != (len - 1)) {
          l[s[j] - 'a'] = s[j - 1];
          r[s[j] - 'a'] = s[j + 1];
        } else if (j == 0 && len >= 2) {
          r[s[0] - 'a'] = s[1];
        } else if (j == (len - 1) && len >= 2) {
          l[s[len - 1] - 'a'] = s[len - 2];
        }
      }
    }
    while (1) {
      char ok = '#';
      for (int i = 0; i < 26; i++) {
        if (r[i] == '#' && pres[i]) {
          ok = (char)(i + 'a');
          break;
        }
      }
      if (ok == '#') {
        break;
      }
      dfs(ok);
    }
    cout << ans << endl;
  }
  return 0;
}
