#include <bits/stdc++.h>
using namespace std;
const long long N = (long long)50 + 3;
const double eps = 1e-8;
int n;
string s, ans;
pair<int, int> near[33];
bool used[33];
vector<int> goodInd;
void print(int ind) {
  ans += char(ind + 'a');
  if (near[ind].second == -1) return;
  print(near[ind].second);
}
int main() {
  cin >> n;
  for (int i = 0; i < 26; i++) {
    near[i] = make_pair(-1, -1);
  }
  for (int i = 1; i <= n; i++) {
    cin >> s;
    if (s.size() == 1) {
      used[s[0] - 'a'] = 1;
      continue;
    }
    near[s[0] - 'a'].second = int(s[1] - 'a');
    near[s[s.size() - 1] - 'a'].first = int(s[s.size() - 2] - 'a');
    for (int j = 1; j + 1 < s.size(); j++) {
      near[s[j] - 'a'] = make_pair(s[j - 1] - 'a', s[j + 1] - 'a');
    }
  }
  for (int i = 0; i < 26; i++) {
    if (near[i].first == -1 && near[i].second != -1 ||
        (near[i] == make_pair(-1, -1) && used[i]))
      print(i);
  }
  cout << ans;
}
