#include <bits/stdc++.h>
using namespace std;
int main() {
  cout << fixed;
  cout.precision(16);
  int n;
  cin >> n;
  vector<string> str[11];
  int sum = 0;
  for (int k = 0; k < n; ++k) {
    string s;
    cin >> s;
    int l = s.length();
    sum += l;
    str[l].push_back(s);
  }
  int len = sum / (n / 2);
  char delim;
  cin >> delim;
  vector<string> res;
  int i = 1, j = len - i;
  while (i <= j) {
    if (j <= 10) {
      sort(str[i].begin(), str[i].end());
      sort(str[j].begin(), str[j].end());
      if (i < j) {
        for (size_t k = 0; k < str[i].size(); ++k) {
          string fst = min(str[i][k], str[j][k]);
          string snd = max(str[i][k], str[j][k]);
          if (delim > 'z' && snd.substr(0, fst.length()) == fst) {
            fst.swap(snd);
          }
          res.push_back(fst + delim + snd);
        }
      } else {
        for (int k = 0; k < (int)str[i].size(); k += 2) {
          res.push_back(str[i][k] + delim + str[i][k + 1]);
        }
      }
    }
    ++i;
    --j;
  }
  sort(res.begin(), res.end());
  for (size_t k = 0; k < res.size(); ++k) {
    cout << res[k] << "\n";
  }
  return 0;
}
