#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> init(255, 1);
set<char> present;
map<char, char> g;
string s;
void dfs(char c) {
  if (c == 0) return;
  cout << c;
  dfs(g[c]);
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s;
    for (char c : s) present.insert(c);
    for (int j = 0; j + 1 < s.size(); j++) {
      g[s[j]] = s[j + 1];
      init[s[j + 1]] = 0;
    }
  }
  for (char c : present) {
    if (init[c] == 1) {
      dfs(c);
    }
  }
  cout << endl;
  return 0;
}
