#include <bits/stdc++.h>
using namespace std;
int n, tot;
char f[26], g[27], x;
multiset<string> s, h[20];
int chk(string &u) {
  auto p = s.lower_bound(u);
  if (p == s.end()) return 0;
  auto w = *p;
  w.resize(u.size());
  return w == u;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    string u;
    cin >> u;
    s.insert(u);
    h[u.size()].insert(u);
    tot += u.size();
  }
  for (int i = 0; i <= 25; ++i) f[i] = g[i] = i + 'a';
  scanf(" %c", &x);
  g[26] = x;
  sort(g, g + 27);
  tot /= n / 2;
  ++tot;
  for (int i = 0; i < n / 2; ++i) {
    string u;
    u.push_back('a');
    for (auto &c : f) {
      u[0] = c;
      if (chk(u)) break;
    }
    while (u.size() != tot) {
      u.push_back('a');
      for (auto &c : g) {
        u.back() = c;
        if (c == x) {
          auto w = u;
          w.pop_back();
          auto p = *s.lower_bound(w);
          if (p == w) {
            s.erase(s.find(w));
            h[w.size()].erase(h[w.size()].find(w));
            int len = tot - u.size();
            w = *h[len].begin();
            u += w;
            s.erase(s.find(w));
            h[len].erase(h[len].begin());
            break;
          }
        } else if (chk(u))
          break;
      }
    }
    cout << u << endl;
  }
}
