#include <bits/stdc++.h>
using namespace std;
int n, pre[33], nex[33], flag[33];
char s[33];
int main() {
  while (~scanf("%d", &n)) {
    memset(pre, -1, sizeof(pre));
    memset(nex, -1, sizeof(nex));
    memset(flag, 0, sizeof(flag));
    while (n--) {
      scanf("%s", s);
      int len = strlen(s);
      flag[s[0] - 'a'] = 1;
      for (int i = 1; i < len; i++) {
        flag[s[i] - 'a'] = 1;
        pre[s[i] - 'a'] = s[i - 1] - 'a';
        nex[s[i - 1] - 'a'] = s[i] - 'a';
      }
    }
    for (int i = 0; i < 26; i++)
      if (pre[i] == -1 && flag[i]) {
        int j = i;
        while (1) {
          flag[j] = 0;
          printf("%c", j + 'a');
          j = nex[j];
          if (j == -1) break;
        }
      }
    printf("\n");
  }
  return 0;
}
