#include <bits/stdc++.h>
using namespace std;
vector<pair<string, int> > d[20];
int cur[20];
int used[20000];
vector<pair<string, int> > a;
int main() {
  char s[1000];
  int i, j, n, tot, l;
  for (i = 0; i < 20; i++) d[i].clear();
  memset(used, 0, sizeof(used));
  memset(cur, 0, sizeof(cur));
  a.clear();
  scanf("%d", &n);
  tot = 0;
  for (i = 0; i < n; i++) {
    scanf("%s", s);
    l = strlen(s);
    tot += l;
    d[l].push_back(make_pair(s, i));
    a.push_back(make_pair(s, i));
  }
  tot /= (n / 2);
  tot++;
  scanf("%s", s);
  for (i = 0; i < n; i++) a[i].first = a[i].first + s;
  sort(a.begin(), a.end());
  for (i = 0; i < 20; i++) sort(d[i].begin(), d[i].end());
  for (i = 0; i < a.size(); i++)
    if (used[a[i].second] == 0) {
      used[a[i].second] = 1;
      printf("%s", a[i].first.c_str());
      for (;
           cur[tot - a[i].first.length()] < d[tot - a[i].first.length()].size();
           cur[tot - a[i].first.length()]++)
        if (used[d[tot - a[i].first.length()][cur[tot - a[i].first.length()]]
                     .second] == 0) {
          used[d[tot - a[i].first.length()][cur[tot - a[i].first.length()]]
                   .second] = 1;
          printf("%s",
                 d[tot - a[i].first.length()][cur[tot - a[i].first.length()]]
                     .first.c_str());
          break;
        }
      printf("\n");
    }
  return 0;
}
