#include <bits/stdc++.h>
struct letter {
  char l, r;
};
std::map<char, letter> chars;
void add_let(const char c, const char l, const char r) {
  if (chars.find(c) == chars.end()) {
    chars[c] = {l, r};
    return;
  }
  auto t = chars[c];
  if (t.l == '\0') t.l = l;
  if (t.r == '\0') t.r = r;
  chars[c] = t;
}
bool was[400] = {false};
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  std::cin >> n;
  for (int i = 0; i < n; ++i) {
    std::string s;
    std::cin >> s;
    if (s.length() == 1) {
      add_let(s[0], '\0', '\0');
      continue;
    }
    add_let(s[0], '\0', s[1]);
    for (size_t j = 1; j < s.length() - 1; j++) {
      add_let(s[j], s[j - 1], s[j + 1]);
    }
    add_let(s[s.length() - 1], s[s.length() - 2], '\0');
  }
  std::string ans = "";
  for (auto tek : chars) {
    if (tek.second.l == '\0') {
      if (!was[tek.first]) {
        was[tek.first] = true;
        ans += tek.first;
        char next = tek.second.r;
        while (next != '\0') {
          was[next] = true;
          const auto l = chars[next];
          ans += next;
          next = l.r;
        }
      }
    }
  }
  std::cout << ans;
  return 0;
}
