#include <bits/stdc++.h>
using namespace std;
int n, mark[255];
string s;
vector<char> g[255], ans;
void dfs(char ch) {
  mark[ch] = 2;
  for (auto u : g[ch])
    if (mark[u] != 2) dfs(u);
  ans.push_back(ch);
}
int main() {
  cin >> n;
  while (n--) {
    cin >> s;
    for (int i = 0; i < (int)s.size() - 1; i++)
      g[s[i]].push_back(s[i + 1]), mark[s[i + 1]] = 3;
    if (mark[s[0]] != 3) mark[s[0]] = 1;
  }
  for (int i = 0; i < 255; i++)
    if (mark[i] == 1) dfs(i);
  reverse(ans.begin(), ans.end());
  for (auto i : ans) cout << i;
}
