#include <bits/stdc++.h>
using namespace std;
const int e9 = 1000 * 1000 * 1000;
const long long e18 = (long long)e9 * (long long)e9;
const double pi = 3.1415926535;
void pV(int num) { cout << num << " "; }
int ri() {
  int x;
  scanf("%d", &x);
  return x;
}
double rd() {
  double x;
  scanf("%lf", &x);
  return x;
}
long long rll() {
  long long x;
  scanf("%lld", &x);
  return x;
}
string rs() {
  string x;
  cin >> x;
  return x;
}
string rsf() {
  string s;
  char c;
  while (c = getchar()) {
    if (c >= 65 && c <= 90 || c >= 'a' && c <= 'z')
      s += c;
    else
      break;
  }
  return s;
}
void wi(int x) { printf("%d ", x); }
void wd(double x) { printf("%lf ", x); }
void wll(long long x) { printf("%lld ", x); }
void ws(string x) { cout << x; }
int main() {
  int n = ri();
  vector<string> mas(n), dop(n);
  int mi = e9, ma = 0;
  for (int i = (int)(0); i <= (int)(n - 1); i++) {
    mas[i] = rs();
    if (mas[i].length() > ma) ma = mas[i].length();
    if (mas[i].length() < mi) mi = mas[i].length();
  }
  string del = rs();
  for (int i = (int)(0); i <= (int)(n - 1); i++) mas[i] += del;
  sort((mas).begin(), (mas).end());
  int len = ma + mi + 1;
  for (int i = (int)(0); i <= (int)(n - 1); i++)
    dop[i] = mas[i].substr(0, mas[i].length() - 1);
  int ind = 0;
  for (int i = (int)(0); i <= (int)(n / 2 - 1); i++) {
    while (mas[ind] == "") ind++;
    ws(mas[ind]);
    int g = mas[ind].length();
    mas[ind].erase();
    for (int j = (int)(0); j <= (int)(n - 1); j++)
      if (len - g == mas[j].length() - 1) {
        ws(dop[j]);
        mas[j].erase();
        break;
      }
    ind++;
    cout << endl;
  }
  return 0;
}
