#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " |       ";
  __f(comma + 1, args...);
}
void FastIO() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  cout.precision(15);
}
long long modpow(long long a, long long p, long long mod) {
  long long ret = 1;
  while (p) {
    if (p & 1) ret = (ret * a) % mod;
    a = (a * a) % mod;
    p /= 2;
  }
  return ret % mod;
}
long long power(long long a, long long p) {
  long long ret = 1;
  while (p) {
    if (p & 1) ret = (ret * a);
    a = (a * a);
    p /= 2;
  }
  return ret;
}
bool vis[26];
int g[26][26], deg[26], cnt[26];
string ans = "";
void dfs(int x) {
  vis[x] = 1;
  ans += (char)(x + 'a');
  for (int i = 0; i < 26; i++)
    if (g[x][i] && !vis[i]) dfs(i);
}
int main() {
  FastIO();
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    cnt[s[0] - 'a']++;
    for (int j = 1; j < (int)(s.size()); j++) {
      cnt[s[j] - 'a']++;
      deg[s[j] - 'a']++;
      g[s[j - 1] - 'a'][s[j] - 'a'] = 1;
    }
  }
  for (int i = 0; i < 26; i++) {
    if (cnt[i] == 0 || deg[i]) continue;
    dfs(i);
  }
  cout << ans << '\n';
  return 0;
}
