#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<string> vs(n);
  for (auto &s : vs) cin >> s;
  char sep;
  cin >> sep;
  int tl = 0;
  set<string> s1;
  set<pair<int, string>> s2;
  for (auto s : vs) {
    s1.insert(s + sep);
    pair<int, string> p = {s.size(), s};
    tl += s.size();
    s2.insert(p);
  }
  int len = 2 * tl / n;
  for (int i = 0; i < n / 2; i++) {
    string s = *s1.begin();
    cout << s;
    s1.erase(s1.begin());
    s.pop_back();
    int gsz = len - s.size();
    pair<int, string> p = {s.size(), s}, p2 = {gsz, string(gsz, min(sep, 'a'))};
    s2.erase(p);
    auto it = s2.lower_bound(p2);
    s1.erase(it->second + sep);
    cout << (it->second) << '\n';
    s2.erase(it);
  }
  return 0;
}
