#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const double eps = 1e-9;
const int N = (int)1e6 + 10;
const int MAXN = 100 + 10;
using namespace std;
int lef[MAXN * 2], righ[MAXN * 2], slovar[MAXN * 2];
vector<char> v;
string res = "";
int n;
bool check() {
  for (int i = 0; i < v.size(); i++)
    if (v[i] != '-') return false;
  return true;
}
string s[MAXN];
void input();
void solve();
void output();
int main() {
  input();
  solve();
  output();
}
void input() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  sort(s, s + n);
}
void solve() {
  for (int i = 0; i < n; i++) {
    if (s[i].size() != 1) {
      for (int j = 0; j < s[i].size(); j++) {
        if (j == 0) {
          righ[s[i][j]] = s[i][j + 1];
        } else if (j == s[i].size() - 1) {
          lef[s[i][j]] = s[i][j - 1];
        } else {
          righ[s[i][j]] = s[i][j + 1];
          lef[s[i][j]] = s[i][j - 1];
        }
      }
    }
    for (int j = 0; j < s[i].size(); j++) slovar[s[i][j]] = 1;
  }
  for (int i = 0; i < 26; i++)
    if (slovar[i + 'a']) v.push_back(i + 'a');
  string ans = "";
  char k;
  for (int i = 0; i < v.size(); i++) {
    if (righ[v[i]] == 0 && lef[v[i]] == 0) {
      ans += v[i];
      for (int h = 0; h < v.size(); h++)
        if (v[h] == v[i]) v[h] = '-';
    }
    if (lef[v[i]] == 0 && righ[v[i]] != 0) k = v[i];
  }
  if (ans.size() == v.size()) {
    res = ans;
    return;
  }
  for (;;) {
    ans += k;
    for (int i = 0; i < v.size(); i++)
      if (v[i] == k) v[i] = '-';
    k = righ[k];
    if (k == 0) {
      res = ans + res;
      ans = "";
      for (int i = 0; i < v.size(); i++) {
        if (v[i] != '-' && lef[v[i]] == 0 && righ[v[i]] != 0) {
          k = v[i];
          break;
        }
      }
    }
    if (check()) break;
  }
}
void output() { cout << res; }
