#include <bits/stdc++.h>
using namespace std;
int n;
string s;
vector<string> a, ot;
vector<int> len;
char d;
int mid = 0;
int use[10010];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i)
    cin >> s, a.push_back(s), len.push_back(s.length());
  cin >> d;
  sort(a.begin(), a.end());
  sort(len.begin(), len.end());
  mid = len[0] + len[len.size() - 1];
  for (int i = 0; i < n; ++i)
    for (int j = i + 1; j < n; ++j)
      if (use[i] == 0 && use[j] == 0 && (a[i] + a[j]).length() == mid) {
        use[i] = 1;
        use[j] = 1;
        if ((a[i] + d + a[j]) < (a[j] + d + a[i]))
          ot.push_back(a[i] + d + a[j]);
        else
          ot.push_back(a[j] + d + a[i]);
      }
  sort(ot.begin(), ot.end());
  if (ot.size() == n / 2)
    for (int i = 0; i < ot.size(); ++i) cout << ot[i] << "\n";
  return 0;
}
