#include <bits/stdc++.h>
using namespace std;
int used[110], t = 0;
string comb(string a, string b) {
  int i, j = 0;
  string res, t;
  if (a.length() < b.length()) {
    t = a;
    a = b;
    b = t;
  }
  for (i = 0; i < a.length(); i++) {
    if (j == 0) {
      if (a[i] == b[0]) j++;
    } else
      j++;
  }
  if (j == 0) {
    for (i = 0; i < b.length(); i++) {
      if (j == 0) {
        if (b[i] == a[0]) j++;
      } else
        j++;
    }
    if (j >= a.length()) return b;
    for (; j < a.length(); j++) {
      b += a[j];
    }
    return b;
  }
  if (j >= b.length()) return a;
  for (; j < b.length(); j++) {
    a += b[j];
  }
  return a;
}
int main() {
  int n, i, j, c1, c2;
  string s[110], ans = "";
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> s[i];
  }
  while (t == 0) {
    t = 1;
    for (i = 0; i < n; i++) {
      if (!used[i]) {
        for (j = i + 1; j < n; j++) {
          if (!used[j]) {
            for (c1 = 0; c1 < s[i].length(); c1++) {
              for (c2 = 0; c2 < s[j].length(); c2++) {
                if (s[i][c1] == s[j][c2]) {
                  t = 0;
                  s[i] = comb(s[i], s[j]);
                  used[j] = 1;
                  break;
                }
              }
              if (used[j] == 1) break;
            }
          }
        }
      }
    }
  }
  for (i = 0; i < n; i++) {
    if (!used[i]) ans = comb(ans, s[i]);
  }
  cout << ans << endl;
  return 0;
}
