#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
int n;
vector<set<string> > ww(11);
string pl;
int main() {
  cin >> n;
  int all = 0;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    ww[s.size()].insert(s);
    all += s.size();
  }
  cin >> pl;
  all = (all * 2 + n) / n;
  for (int i = 0; i < n / 2; i++) {
    string best;
    int bj = -1;
    for (int j = 1; j <= 10; j++) {
      if (ww[j].size() == 0) continue;
      string ps = *ww[j].begin();
      ww[j].erase(ps);
      int jj = all - j - 1;
      if (ww[jj].size() != 0) {
        string s = ps + pl[0] + *ww[jj].begin();
        if (best.size() == 0 || s < best) {
          bj = j;
          best = s;
        }
      }
      ww[j].insert(ps);
    }
    if (bj == -1) throw 0;
    ww[bj].erase(ww[bj].begin());
    ww[all - bj - 1].erase(ww[all - bj - 1].begin());
    cout << best << endl;
  }
  return 0;
}
