#include <bits/stdc++.h>
using namespace std;
char c;
vector<string> V[11];
string arr[10005];
int main() {
  int n, len = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string tec;
    cin >> tec;
    len += (int)tec.size();
    V[tec.size()].push_back(tec);
  }
  cin >> c;
  len /= n / 2;
  for (int i = 1; i <= 10; i++) {
    sort(V[i].begin(), V[i].end());
  }
  int kol = 0;
  for (int i = 1; i <= len / 2; i++) {
    for (int j = 0; j < V[i].size(); j++) {
      if (i == (len + 1) / 2) {
        arr[kol] = min(V[i][j] + c + V[i][j + 1], V[i][j + 1] + c + V[i][j]);
        j++;
        kol++;
      } else {
        arr[kol] =
            min(V[len - i][j] + c + V[i][j], V[i][j] + c + V[len - i][j]);
        kol++;
      }
    }
  }
  sort(arr, arr + n / 2);
  for (int i = 0; i < n / 2; i++) {
    printf("%s\n", arr[i].c_str());
  }
  return 0;
}
