#include <bits/stdc++.h>
using namespace std;
const int MAX = 10005;
string str1[MAX];
char ch[100];
bool mark[MAX];
string str2[MAX];
int main(void) {
  int n;
  int i, j;
  int length = 0;
  memset(mark, false, sizeof(mark));
  scanf("%d", &n);
  for (i = 0; i < n; ++i) {
    scanf("%s", ch);
    str1[i].assign(ch);
    length += str1[i].size();
  }
  length /= n / 2;
  char d;
  scanf("%s", ch);
  d = ch[0];
  sort(str1, str1 + n);
  int k = 0;
  for (i = 0; i < n; ++i) {
    if (mark[i]) continue;
    for (j = i + 1; j < n; ++j) {
      if (!mark[j] && str1[i].size() + str1[j].size() == length) {
        mark[j] = true;
        if (str1[i] + d + str1[j] < str1[j] + d + str1[i])
          sprintf(ch, "%s%c%s", str1[i].c_str(), d, str1[j].c_str());
        else
          sprintf(ch, "%s%c%s", str1[j].c_str(), d, str1[i].c_str());
        str2[k++].assign(ch);
        break;
      }
    }
  }
  sort(str2, str2 + n / 2);
  for (i = 0; i < n / 2; ++i) printf("%s\n", str2[i].c_str());
  return 0;
}
