#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
struct gg {
  int heat;
  int next;
} a[30];
int main() {
  int n;
  scanf("%d", &n);
  memset(a, 0, sizeof(a));
  for (int i = 0; i < n; i++) {
    char s[30];
    scanf("%s", s);
    int len = strlen(s);
    if (a[s[0] - 'a' + 1].next == 0) a[s[0] - 'a' + 1].heat = 1;
    for (int j = 0; j < len - 1; j++) {
      int u = s[j] - 'a' + 1, v = s[j + 1] - 'a' + 1;
      a[u].next = v;
      a[v].heat = 0;
    }
    if (a[s[len - 1] - 'a' + 1].next == 0) a[s[len - 1] - 'a' + 1].next = -1;
  }
  for (int i = 1; i <= 26; i++) {
    if (a[i].heat == 1) {
      int j = i;
      while (a[j].next != -1) {
        printf("%c", j + 'a' - 1);
        j = a[j].next;
      }
      printf("%c", j + 'a' - 1);
    }
  }
}
