#include <bits/stdc++.h>
using namespace std;
int n;
string a[100];
int m[100][26];
bool s1[100];
string makestr(string s1, string s2) {
  char w = '*';
  string make = "";
  int s[26];
  for (int i = 0; i < 26; ++i) s[i] = 0;
  for (int i = 0; i < s1.length(); ++i) s[int(s1[i]) - 97] = 1;
  for (int i = 0; i < s2.length(); ++i) {
    if (s[int(s2[i]) - 97] == 1) {
      w = s2[i];
      break;
    }
  }
  if (w == '*')
    return s1 + s2;
  else {
    int pref1 = 0;
    int pref2 = 0;
    while (s1[pref1] != w) ++pref1;
    while (s2[pref2] != w) ++pref2;
    if (pref1 < pref2) {
      swap(s1, s2);
      swap(pref1, pref2);
    }
    for (int i = 0; i < s1.length(); ++i) {
      make += s1[i];
    }
    if (s2.length() - pref2 > s1.length() - pref1) {
      for (int i = pref2 + s1.length() - pref1; i < s2.length(); ++i)
        make += s2[i];
    }
    return make;
  }
}
string dfs(string st) {
  int u[26];
  for (int i = 0; i < 26; ++i) u[i] = 0;
  for (int i = 0; i < st.length(); ++i) u[int(st[i]) - 97] = 1;
  for (int i = 1; i < n; ++i) {
    if (s1[i]) {
      for (int j = 0; j < 26; ++j)
        if (m[i][j] && u[j]) {
          st = makestr(st, a[i]);
          s1[i] = false;
          st = dfs(st);
        }
    }
  }
  return st;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    s1[i] = true;
  }
  for (int i = 0; i < n; ++i) {
    string st = a[i];
    for (int j = 0; j < st.length(); ++j) {
      m[i][int(st[j] - 97)] = 1;
    }
  }
  string st = dfs(a[0]);
  for (int i = 1; i < n; ++i) {
    if (s1[i]) {
      st = makestr(st, dfs(a[i]));
    }
  }
  cout << st;
}
