#include <bits/stdc++.h>
bool Contains(std::string s, char a) {
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == a) return true;
  }
  return false;
}
void MakeStrings(std::string it, std::string& s1, std::string& s2, char a) {
  bool ch = true;
  for (int i = 0; i < it.size(); ++i) {
    if (it[i] == a) {
      ch = false;
      continue;
    }
    if (ch)
      s1.push_back(it[i]);
    else
      s2.push_back(it[i]);
  }
}
void Merge(std::list<std::string>::iterator& it, std::string& s, char a,
           std::list<std::string>& another_list) {
  std::string s1, s2, s3, s4;
  if (s.empty()) {
    s = *it;
    return;
  }
  if (!Contains(s, a))
    another_list.push_back(*it);
  else {
    MakeStrings(*it, s1, s2, a);
    MakeStrings(s, s3, s4, a);
    s1 = s1.size() >= s3.size() ? s1 : s3;
    s2 = s2.size() >= s4.size() ? s2 : s4;
    s = s1 + a + s2;
  }
}
int main() {
  int n;
  std::cin >> n;
  std::list<std::string> strings_list;
  for (int i = 0; i < n; ++i) {
    std::string s;
    std::cin >> s;
    strings_list.push_back(s);
  }
  std::list<std::string> another_list;
  std::list<std::string> one_more;
  std::string s;
  do {
    one_more = another_list;
    for (int i = 97; i < 123; ++i) {
      another_list.clear();
      for (std::list<std::string>::iterator it = strings_list.begin();
           it != strings_list.end(); ++it) {
        if (Contains(*it, char(i)))
          Merge(it, s, char(i), another_list);
        else
          another_list.push_back(*it);
      }
      strings_list = another_list;
    }
    if (one_more == another_list) {
      std::cout << s;
      s.clear();
    }
  } while (!another_list.empty());
  std::cout << s << std::endl;
}
