#include <bits/stdc++.h>
using namespace std;
int u[100010];
vector<int> g[100010];
vector<int> order;
int cv = -1;
void dfs(int v) {
  u[v] = 1;
  for (int i = 0; i < g[v].size(); i++) {
    int to = g[v][i];
    if (!u[to]) dfs(to);
  }
  order.push_back(v);
  u[v] = 2;
}
bool vstr[110];
bool bad[110];
int main() {
  int n, m, s, a, b, x;
  char str[110] = {};
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf(" %s", str);
    vstr[str[0] - 'a'] = 1;
    for (int j = 0; str[j + 1] != 0; j++) {
      g[str[j] - 'a'].push_back(str[j + 1] - 'a');
      vstr[str[j + 1] - 'a'] = 1;
      vstr[str[j] - 'a'] = 1;
      bad[str[j + 1] - 'a'] = 1;
    }
  }
  for (int i = 0; i < 26; i++)
    if (vstr[i] && !bad[i] && !u[i]) dfs(i);
  for (int i = order.size() - 1; i > -1; i--) printf("%c", order[i] + 'a');
}
