#include <bits/stdc++.h>
using namespace std;
const int MAXLEN = 10;
vector<string> v[MAXLEN + 1];
string ans;
int main() {
  int n, len0;
  char symd;
  ans = "";
  len0 = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string st;
    cin >> st;
    v[0].push_back(st);
    len0 += st.length();
  }
  len0 /= n / 2;
  cin >> symd;
  for (vector<string>::iterator iter = v[0].begin(); iter != v[0].end();
       iter++) {
    *iter += symd;
    v[(*iter).length() - 1].push_back((*iter));
  }
  v[0].clear();
  for (int i = 1; i <= MAXLEN; i++) sort(v[i].begin(), v[i].end());
  n /= 2;
  while (n--) {
    int len1 = -1, len2;
    string pre, lat;
    for (int i = 1; i <= MAXLEN; i++)
      if (!v[i].empty() && (len1 == -1 || v[i].front() < v[len1].front()))
        len1 = i;
    len2 = len0 - len1;
    pre = v[len1].front();
    v[len1].erase(v[len1].begin());
    lat = v[len2].front().substr(0, len2);
    v[len2].erase(v[len2].begin());
    ans += pre + lat + "\n";
  }
  cout << ans;
  return 0;
}
