#include <bits/stdc++.h>
using namespace std;
struct node {
  int g, prev, next;
  node() {
    g = 0;
    next = -1;
    prev = -1;
  }
} a[26];
int check() {
  for (int i = 0; i < 26; i++)
    if (a[i].g != 0) return 1;
  return 0;
}
int n, b[26];
int main() {
  scanf("%d", &n);
  while (n-- > 0) {
    char x[26];
    scanf("%s", x);
    for (int i = 0; i < strlen(x); i++) {
      a[x[i] - 'a'].g = 1;
      if (i < strlen(x) - 1) a[x[i] - 'a'].next = x[i + 1] - 'a';
      if (i > 0) a[x[i] - 'a'].prev = x[i - 1] - 'a';
    }
  }
  while (check()) {
    int i = 0;
    while (!(a[i].g == 1 && a[i].prev == -1)) i++;
    while (i != -1) {
      printf("%c", i + 'a');
      a[i].g = 0;
      i = a[i].next;
    }
  }
  return 0;
}
