#include <bits/stdc++.h>
using namespace std;
struct nucl {
  bool start;
  bool realstart;
  char name;
  int next_ind;
  void init(int i) {
    start = true;
    realstart = false;
    name = i;
    next_ind = 0;
  }
};
int main() {
  nucl a[300];
  for (int i = 'a'; i <= 'z'; i++) a[i].init(i);
  int n;
  cin >> n;
  for (int j = 0; j < n; j++) {
    string s;
    cin >> s;
    a[s[0]].realstart = true;
    for (int i = 1; i < s.size(); i++) {
      char c1 = s[i - 1];
      char c2 = s[i];
      a[c1].next_ind = c2;
      a[c2].start = false;
    }
  }
  string answ = "";
  for (int i = 'a'; i <= 'z'; i++)
    if (a[i].start && a[i].realstart) {
      for (int j = i; j != 0; j = a[j].next_ind) answ += a[j].name;
    }
  cout << answ << endl;
  return 0;
}
