#include <bits/stdc++.h>
using namespace std;
multimap<string, pair<int, int> > srtd;
string arr[10004];
string arrE[10004];
set<string> tmp[20];
map<string, int> pos;
int vis[10004];
vector<string> out;
int main() {
  int n;
  cin >> n;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    tmp[arr[i].size()].insert(arr[i]);
    sum += arr[i].size();
  }
  char s;
  cin >> s;
  int size = sum / (n / 2);
  for (int i = 0; i < n; i++) {
    arrE[i] = arr[i] + s;
  }
  sort(arrE, arrE + n);
  for (int i = 0; i < n; i++) pos[arrE[i]] = i;
  for (int i = 0; i < n; i++) {
    if (!vis[i]) {
      int ot = size - arrE[i].size() + 1;
      set<string>::iterator it = tmp[ot].begin();
      while ((*tmp[ot].begin()) + s == arrE[i] ||
             vis[pos[(*tmp[ot].begin()) + s]] == 1) {
        tmp[ot].erase(tmp[ot].begin());
        it = tmp[ot].begin();
      }
      out.push_back(arrE[i] + (*tmp[ot].begin()));
      vis[i] = 1;
      vis[pos[(*tmp[ot].begin()) + s]] = 1;
      tmp[ot].erase(tmp[ot].begin());
    }
  }
  for (int i = 0; i < out.size(); i++) cout << out[i] << endl;
}
