#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 1e2 + 200;
const int INF = 0x3f3f3f3f;
int vis[30];
string s;
int ind[maxn];
vector<int> G[maxn];
void dfs(int u) {
  vis[u] = 2;
  s += u + 'a';
  for (int i = 0; i < G[u].size(); i++) {
    int& v = G[u][i];
    if (vis[v] != 2) {
      dfs(v);
    }
  }
}
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    for (int i = 1; i <= n; i++) {
      cin >> s;
      for (int j = 0; j < s.size() - 1; j++) {
        G[s[j] - 'a'].push_back(s[j + 1] - 'a');
        vis[s[j + 1] - 'a'] = 3;
      }
      if (vis[s[0] - 'a'] != 3) {
        vis[s[0] - 'a'] = 1;
      }
    }
    s = "";
    for (int i = 0; i < 26; i++) {
      if (vis[i] == 1) {
        dfs(i);
      }
    }
    cout << s << endl;
  }
  return 0;
}
