#include <bits/stdc++.h>
int a[260], b[100000];
int bu[260];
using namespace std;
int main() {
  vector<string> v;
  string o;
  long long n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    v.push_back(s);
  }
  for (int i = 0; i < n; i++)
    for (int j = 1; j < v[i].size(); j++) bu[v[i][j]] = 1;
  while (1) {
    int w = 0;
    int m = 0;
    for (int i = 0; i < n; i++) {
      if (v[i] != "Q") {
        int ol = 0;
        for (int j = 0; j < v[i].size(); j++) {
          if (a[v[i][j]] == 1) ol++;
        }
        if (ol > 0) {
          for (int j = 0; j < v[i].size(); j++) {
            if (a[v[i][j]] == 0) {
              o = o + v[i][j];
              a[v[i][j]] = 1;
            }
          }
          v[i] = "Q";
          m++;
        }
      } else
        w++;
    }
    if (w == n) break;
    if (m == 0) {
      for (int i = 0; i < n; i++) {
        if (v[i] != "Q") {
          if (bu[v[i][0]] == 0) {
            for (int j = 0; j < v[i].size(); j++) {
              if (a[v[i][j]] == 0) {
                o = o + v[i][j];
                a[v[i][j]] = 1;
              }
            }
            v[i] = "Q";
            break;
          }
        }
      }
    }
  }
  cout << o << endl;
  return 0;
}
