#include <bits/stdc++.h>
int fx[] = {-1, 0, +1, 0}, fy[] = {0, +1, 0, -1},
    ex[] = {-1, -1, 0, +1, +1, +1, 0, -1},
    ey[] = {0, +1, +1, +1, 0, -1, -1, -1};
using namespace std;
int n;
int len[20000], p[20000];
char tmp[20000][20], s[20000][20];
char dvd;
char asd[20000], dfa[20000];
bool w[20000];
int length;
bool comp(const int &a, const int &b) {
  strcpy(asd, s[a]);
  strcat(asd, s[b]);
  strcpy(dfa, s[b]);
  strcat(dfa, s[a]);
  for (int i = 0; i < len[a] + len[b]; i++)
    if (asd[i] < dfa[i])
      return 1;
    else if (asd[i] > dfa[i])
      return 0;
  return 0;
}
int main() {
  scanf("%d\n", &n);
  for (int i = 0; i < n; i++) {
    scanf("%s\n", tmp[i]);
    len[i] = strlen(tmp[i]) + 1;
    for (int j = 1; j < len[i]; j++) s[i][j] = tmp[i][j - 1];
  }
  scanf("%c", &dvd);
  for (int i = 0; i < n; i++) s[i][0] = dvd;
  for (int i = 0; i < n; i++) p[i] = i;
  sort(p, p + n, comp);
  for (int i = 0; i < n; i++) length += len[i];
  length /= n >> 1;
  for (int i = 0; i < n; i++)
    if (!w[i])
      for (int j = i + 1; j < n; j++)
        if (!w[j] && len[p[i]] + len[p[j]] == length) {
          w[j] = 1;
          printf("%s%s\n", s[p[i]] + 1, s[p[j]]);
          break;
        }
  return 0;
}
