#include <bits/stdc++.h>
using namespace std;
vector<string> S, T, *ptr;
struct cmp1 {
  cmp1() {}
  bool operator()(const int &A, const int &B) const { return S[A] < S[B]; }
};
struct cmp2 {
  cmp2() {}
  bool operator()(const int &A, const int &B) const { return T[A] < T[B]; }
};
int main(int argc, char **argv) {
  int N, mx = 0, pl = 0;
  cin >> N;
  string sep;
  bool used[N];
  memset(used, 0, sizeof(used));
  S = vector<string>(N), T = vector<string>(N);
  for (int i = (0); i < (N); ++i)
    cin >> S[i], mx += S[i].length(), pl = max(pl, (int)S[i].length());
  mx /= (N / 2);
  mx++;
  cin >> sep;
  vector<int> sp[pl], tp(N);
  for (int i = (0); i < (N); ++i)
    T[i] = S[i] + sep, tp[i] = i, sp[(int)S[i].length() - 1].push_back(i);
  for (int i = (0); i < (pl); ++i) sort(sp[i].begin(), sp[i].end(), cmp1());
  sort(tp.begin(), tp.end(), cmp2());
  for (int i = (0); i < (N); ++i)
    if (!used[tp[i]]) {
      used[tp[i]] = 1;
      string p;
      int q = mx - T[tp[i]].length() - 1;
      while (sp[q].size()) {
        if (used[sp[q].front()])
          sp[q].erase(sp[q].begin());
        else {
          used[sp[q].front()] = 1;
          p = T[tp[i]] + S[sp[q].front()];
          sp[q].erase(sp[q].begin());
          break;
        }
      }
      cout << p << endl;
    }
  return 0;
}
