#include <bits/stdc++.h>
int main() {
  int n;
  std::string s;
  std::map<char, char> path, back_path;
  std::set<char> extra;
  std::map<char, bool> result;
  for (int i = 0; i != 26; ++i) {
    path['a' + i] = '0';
    back_path['a' + i] = '0';
    result['a' + 1] = false;
  }
  std::cin >> n;
  for (int i = 0; i != n; ++i) {
    std::cin >> s;
    if (s.length() == 1) {
      extra.insert(s[0]);
    } else {
      for (int j = 0; j != s.length(); ++j) {
        if (j != 0) {
          path[s[j - 1]] = s[j];
          back_path[s[j]] = s[j - 1];
        }
      }
    }
  }
  for (int i = 0; i != 26; ++i) {
    if (back_path['a' + i] != '0') {
      char current = 'a' + i;
      while (back_path[current] != '0') {
        current = back_path[current];
      }
      while (path[current] != '0') {
        back_path[current] = '0';
        std::cout << current;
        result[current] = true;
        current = path[current];
      }
      back_path[current] = '0';
      std::cout << current;
      result[current] = true;
    }
  }
  for (char elem : extra) {
    if (!result[elem]) {
      std::cout << elem;
    }
  }
  return 0;
}
