#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> names(n);
  map<string, bool> used;
  map<string, bool> nd_used;
  map<int, vector<string>> byd;
  int sum_len = 0;
  for (int i = 0; i < n; i++) {
    cin >> names[i];
    sum_len += names[i].size();
    used[names[i]] = false;
    byd[names[i].size()] = {};
  }
  string d;
  cin >> d;
  vector<string> nd;
  for (auto elem : names) {
    nd.push_back(elem + d);
    nd_used[elem + d] = false;
    byd[elem.size()].push_back(elem);
  }
  for (auto &vec : byd) {
    sort(vec.second.begin(), vec.second.end());
    reverse(vec.second.begin(), vec.second.end());
  }
  sort(nd.begin(), nd.end());
  int len = sum_len / (n / 2) + 1;
  int nd_cnt = 0;
  for (int i = 0; i < n / 2; i++) {
    while (nd_used[nd[nd_cnt]]) nd_cnt += 1;
    cout << nd[nd_cnt];
    nd_used[nd[nd_cnt]] = true;
    int nlen = len - nd[nd_cnt].size();
    int n_cnt = byd[nlen].size() - 1;
    while (used[byd[nlen][n_cnt]] || nd_used[byd[nlen][n_cnt] + d]) {
      byd[nlen].pop_back();
      n_cnt -= 1;
    }
    cout << byd[nlen][n_cnt] << '\n';
    used[byd[nlen][n_cnt]] = true;
    nd_used[byd[nlen][n_cnt] + d] = true;
    byd[nlen].pop_back();
  }
  return 0;
}
