#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:16777216")
#pragma warning(disable : 4786)
vector<string> str, res;
queue<string> q[15];
int n;
set<string> st;
string s, a, b;
int main() {
  double start_time = clock();
  int i, tot, len, x;
  cin >> n;
  tot = 0;
  for (i = 0; i < n; i++) {
    cin >> s;
    str.push_back(s);
    tot += s.size();
  }
  len = (tot * 2) / n;
  cin >> s;
  sort(str.begin(), str.end());
  for (i = 0; i < n; i++) {
    q[str[i].size()].push(str[i]);
  }
  for (i = 0; i < n; i++) {
    if (st.find(str[i]) != st.end()) continue;
    a = str[i];
    st.insert(str[i]);
    x = len - str[i].size();
    while (str[i] == q[x].front() || st.find(q[x].front()) != st.end())
      q[x].pop();
    st.insert(q[x].front());
    b = q[x].front();
    q[x].pop();
    string xx = a + s + b;
    string yy = b + s + a;
    if (xx < yy)
      res.push_back(xx);
    else
      res.push_back(yy);
  }
  sort(res.begin(), res.end());
  for (i = 0; i < res.size(); i++) cout << res[i] << endl;
  double end_time = clock();
  fprintf(stderr, "Time = %lf\n", (end_time - start_time) / CLOCKS_PER_SEC);
  return 0;
}
