#include <bits/stdc++.h>
using namespace std;
char op;
struct Name {
  char str[15];
  bool flag;
  int len;
} name[10005];
int n;
bool Com(Name a, Name b) {
  char str1[20], str2[20];
  int i, j;
  for (i = 0; i < a.len; i++) str1[i] = a.str[i];
  str1[i++] = op;
  str1[i++] = '\0';
  for (i = 0; i < b.len; i++) str2[i] = b.str[i];
  str2[i++] = op;
  str2[i++] = '\0';
  return strcmp(str1, str2) < 0;
}
int main() {
  while (scanf("%d", &n) != EOF) {
    int i, j;
    int len = 0;
    for (i = 0; i < n; i++) {
      scanf("\n%s", &name[i].str);
      len += (name[i].len = strlen(name[i].str));
      name[i].flag = false;
    }
    scanf("\n%c", &op);
    sort(name, name + n, Com);
    len = len / (n / 2);
    for (i = 0; i < n; i++) {
      if (name[i].flag == true) continue;
      for (j = 0; j < n; j++) {
        if (name[j].flag == true || i == j) continue;
        if (name[i].len + name[j].len == len) {
          printf("%s%c%s\n", name[i].str, op, name[j].str);
          name[i].flag = true;
          name[j].flag = true;
          break;
        }
      }
    }
  }
  return 0;
}
