#include <bits/stdc++.h>
using namespace std;
int n, sz, all, len[12], now[12];
string ch, tmp, s[12][10005];
int main() {
  cin >> n;
  for (int64_t i = 1; i <= (int64_t)(n); i++) {
    cin >> tmp;
    sz = tmp.size();
    all += sz;
    s[sz][++len[sz]] = tmp;
  }
  cin >> ch;
  all /= (n / 2);
  for (int64_t i = 1; i <= (int64_t)(10); i++)
    if (len[i]) sort(s[i] + 1, s[i] + len[i] + 1);
  for (int64_t i = 1; i <= (int64_t)(n / 2); i++) {
    int who = 0;
    string ss = "";
    for (int64_t j = 1; j <= (int64_t)(10); j++)
      if (now[j] < len[j])
        if (!who || s[j][now[j] + 1] + ch +
                            s[all - j][now[all - j] + 1 + (all - j == j)] <
                        ss)
          who = j, ss = s[j][now[j] + 1] + ch +
                        s[all - j][now[all - j] + 1 + (all - j == j)];
    now[who]++;
    now[all - who]++;
    cout << ss << "\n";
  }
  return 0;
}
