#include <bits/stdc++.h>
using namespace std;
template <class T1>
void __(T1 p) {
  cout << p << endl;
}
template <class T1>
void deb(T1 p) {
  cout << "Debugging: " << p << endl;
}
template <class T1, class T2>
void deb(T1 p, T2 q) {
  cout << "Debugging: " << p << "\t" << q << endl;
}
template <class T1, class T2, class T3>
void deb(T1 p, T2 q, T3 r) {
  cout << "Debugging: " << p << "\t " << q << "\t " << r << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 p, T2 q, T3 r, T4 s) {
  cout << "Debugging: " << p << "\t " << q << "\t " << r << "\t " << s << endl;
}
long long int POOW(long long b, long long p) {
  if (p == 0) return 1;
  return b * POOW(b, p - 1);
}
string ans = "";
vector<string> st;
vector<int> v[105];
int n, len;
int flag[105] = {0};
string DFS(int a) {
  if (flag[a] == 2) return "";
  flag[a] = 2;
  string b = "1";
  b[0] = a + 'a';
  for (int i = 0; i < v[a].size(); i++) {
    b += DFS(v[a][i]);
  }
  return b;
}
int main() {
  int i, j, k, a, b, c, d, l, l1, l2;
  string p;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    cin >> p;
    l = p.size();
    for (j = 0; j < l - 1; j++) {
      v[p[j] - 'a'].push_back(p[j + 1] - 'a');
      flag[p[j + 1] - 'a'] = 3;
    }
    if (flag[p[0] - 'a'] != 3) flag[p[0] - 'a'] = 1;
  }
  for (i = 0; i < 26; i++) {
    if (flag[i] == 1) cout << DFS(i);
  }
  printf("\n");
  return 0;
}
