#include <bits/stdc++.h>
using namespace std;
void merge(int s, int d, string v[]) {
  string *c = new string[d - s + 1];
  int mid = (s + d) / 2, i = s, j = mid + 1, k = 0;
  while (i <= mid && j <= d) {
    if (v[i] + v[j] < v[j] + v[i])
      c[k++] = v[i++];
    else
      c[k++] = v[j++];
  }
  while (i <= mid) c[k++] = v[i++];
  while (j <= d) c[k++] = v[j++];
  for (int i = 0; i <= d - s; i++) v[i + s] = c[i];
}
void mergeSort(int s, int d, string v[]) {
  if (s == d) return;
  int mid = (s + d) / 2;
  mergeSort(s, mid, v);
  mergeSort(mid + 1, d, v);
  merge(s, d, v);
}
void lenMerge(int s, int d, string v[]) {
  string *c = new string[d - s + 1];
  int mid = (s + d) / 2, i = s, j = mid + 1, k = 0;
  while (i <= mid && j <= d) {
    if (v[i].length() < v[j].length())
      c[k++] = v[i++];
    else
      c[k++] = v[j++];
  }
  while (i <= mid) c[k++] = v[i++];
  while (j <= d) c[k++] = v[j++];
  for (int i = 0; i <= d - s; i++) v[i + s] = c[i];
}
void lenMergeSort(int s, int d, string v[]) {
  if (s == d) return;
  int mid = (s + d) / 2;
  mergeSort(s, mid, v);
  mergeSort(mid + 1, d, v);
  merge(s, d, v);
}
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  string *str = new string[n];
  string *clone = new string[n];
  string *oneMore = new string[n];
  for (int i = 0; i < n; i++) {
    cin >> str[i];
    clone[i] = str[i];
  }
  int suma = 0;
  for (int i = 0; i < n; i++) {
    suma += str[i].length();
  }
  mergeSort(0, n - 1, clone);
  string d;
  cin >> d;
  for (int i = 0; i < n; i++) {
    oneMore[i] = str[i] + d;
  }
  mergeSort(0, n - 1, oneMore);
  bool *takenOM, *takenS;
  takenOM = new bool[n];
  takenS = new bool[n];
  for (int i = 0; i < n; i++) {
    takenS[i] = takenOM[i] = 0;
  }
  int lungime = suma / (n / 2);
  for (int i = 0; i < n; i++) {
    if (takenOM[i] == 1) continue;
    cout << oneMore[i];
    takenOM[i] = 1;
    for (int j = 0; j < n; j++) {
      if (takenOM[j] == 1) continue;
      if (oneMore[i].length() + oneMore[j].length() == lungime + 2) {
        cout << oneMore[j].substr(0, oneMore[j].length() - 1) << '\n';
        takenOM[j] = 1;
        break;
      }
    }
  }
  return 0;
}
