#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> G[28];
int visit[28];
void dfs(int i) {
  visit[i] = 3;
  cout << (char)(i + 'a');
  for (int j = 0; j < G[i].size(); j++) {
    int t = G[i][j];
    if (visit[t] != 3) {
      dfs(t);
    }
  }
}
int main() {
  char str[25];
  int i, n, j = 0;
  scanf("%d", &n);
  getchar();
  memset(visit, 0, sizeof(visit));
  while (n--) {
    gets(str);
    int len = strlen(str);
    for (i = 0; i < len - 1; i++) {
      G[str[i] - 'a'].push_back(str[i + 1] - 'a');
      visit[str[i + 1] - 'a'] = 2;
    }
    if (visit[str[0] - 'a'] != 2) visit[str[0] - 'a'] = 1;
  }
  for (int i = 0; i < 28; i++) {
    if (visit[i] == 0) continue;
    if (visit[i] == 1) {
      dfs(i);
    }
  }
  return 0;
}
