#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long INF64 = 1e18;
const int MOD = 1e9 + 7;
const long double PI = acosl(-1.0);
const long double EPS = 1e-9;
const int N = 150 + 10;
char g[N];
int used[N];
string ans = "";
vector<string> a;
void dfs(char v) {
  used[v] = 3;
  char to = g[v];
  if (used[to] != 3 && to) dfs(to);
  ans += v;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < int(n); ++i) {
    string s;
    cin >> s;
    a.push_back(s);
    for (int j = int(1); j < int(int((s).size())); ++j) {
      used[s[j]] = 2;
      g[s[j - 1]] = s[j];
    }
    if (used[s[0]] != 2) used[s[0]] = 1;
  }
  for (int i = 'a'; i <= 'z'; i++)
    if (used[i] == 1) dfs(i);
  reverse((ans).begin(), (ans).end());
  cout << ans << endl;
}
