#include <bits/stdc++.h>
using namespace std;
const int MaxN = 3e5 + 5;
int vis[50];
vector<int> G[50];
void dfs(int x) {
  vis[x] = 2;
  cout << (char)('a' + x);
  for (auto u : G[x]) {
    if (vis[u] != 2) {
      dfs(u);
    }
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    string s;
    cin >> s;
    for (int j = 1; j < s.size(); j++) {
      vis[s[j] - 'a'] = 1;
      G[s[j - 1] - 'a'].push_back(s[j] - 'a');
    }
    if (!vis[s[0] - 'a']) vis[s[0] - 'a'] = 6;
  }
  for (int i = 0; i < 26; i++) {
    if (vis[i] == 6) dfs(i);
  }
  cout << endl;
  return 0;
}
