#include <bits/stdc++.h>
using namespace std;
const int maxn = 10005;
struct node {
  char str[15];
  int id;
  node(char *key = NULL, int a = 0) {
    if (key != NULL) strcpy(str, key);
    id = a;
  }
  bool operator<(const node &ot) const { return strcmp(str, ot.str) > 0; }
} data[maxn];
priority_queue<node> que[15];
char ch[5];
int n, length;
bool view[maxn];
void init() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%s", data[i].str);
    length += strlen(data[i].str);
  }
  scanf("%s", ch);
  length /= n / 2;
}
bool cmp(node a, node b) {
  int len1 = strlen(a.str), len2 = strlen(b.str);
  if (len1 == len2)
    return strcmp(a.str, b.str) < 0;
  else {
    int len = len1 < len2 ? len1 : len2;
    for (int i = 0; i < len; i++) {
      if (a.str[i] < b.str[i])
        return true;
      else if (a.str[i] > b.str[i])
        return false;
    }
    if (len1 < len2)
      return ch[0] < b.str[len1];
    else
      return a.str[len2] < ch[0];
  }
}
void work() {
  sort(data, data + n, cmp);
  for (int i = 0; i < n; i++) {
    data[i].id = i;
    que[strlen(data[i].str)].push(data[i]);
  }
  memset(view, 0, sizeof(view));
  for (int i = 0; i < n; i++) {
    char s[100];
    memset(s, 0, sizeof(s));
    if (view[i]) continue;
    view[i] = 1;
    strcat(s, data[i].str);
    strcat(s, ch);
    int t = length - strlen(data[i].str);
    while (1) {
      node x = que[t].top();
      que[t].pop();
      if (view[x.id]) continue;
      view[x.id] = 1;
      strcat(s, x.str);
      break;
    }
    printf("%s\n", s);
  }
}
int main() {
  init();
  work();
  return 0;
}
