#include <bits/stdc++.h>
using namespace std;
int used[26];
int _next[26];
int st[26];
char s[30];
int main() {
  for (int i = 0; i < 26; ++i) {
    _next[i] = -1;
  }
  int n;
  scanf("%d\n", &n);
  for (int i = 0; i < n; ++i) {
    gets(s);
    int len = strlen(s);
    used[s[0] - 'a'] = 1;
    for (int j = 1; j < len; ++j) {
      _next[s[j - 1] - 'a'] = s[j] - 'a';
      used[s[j] - 'a'] = 1;
      st[s[j] - 'a'] = 1;
    }
  }
  for (int i = 0; i < 26; ++i) {
    if (used[i] == 1 && st[i] == 0) {
      int v = i;
      while (v != -1) {
        printf("%c", (char)v + 'a');
        v = _next[v];
      }
    }
  }
  return 0;
}
