#include <bits/stdc++.h>
using namespace std;
int n, child[26], vis[26];
string ans, s;
void dfs(int i) {
  if (i == -1) return;
  ans.push_back(i + 'a');
  dfs(child[i]);
}
int main() {
  memset(child, -1, sizeof child);
  memset(vis, -1, sizeof vis);
  cin >> n;
  for (int D = 1; D <= n; D++) {
    cin >> s;
    for (int i = 0; i < s.size() - 1; i++) {
      child[s[i] - 'a'] = s[i + 1] - 'a';
    }
    for (int i = 1; i < s.size(); i++) vis[s[i] - 'a'] = 0;
    if (vis[s[0] - 'a'] == -1) vis[s[0] - 'a'] = 1;
  }
  for (int i = 0; i < 26; i++) {
    if (vis[i] == 1) {
      dfs(i);
    }
  }
  cout << ans;
  return 0;
}
