#include <bits/stdc++.h>
using namespace std;
string s[10000];
char d;
bool check(string a, string b) { return (a + d + b) < (b + d + a); }
int used[10000];
int main(void) {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) cin >> s[i];
  scanf(" %c", &d);
  int len = 0;
  for (int i = 0; i < n; i++) len += s[i].length();
  len /= (n / 2);
  sort(s, s + n, check);
  for (int i = 0; i < n; i++)
    if (!used[i]) {
      used[i] = 1;
      for (int j = i + 1; j < n; j++)
        if (!used[j] && s[i].length() + s[j].length() == len) {
          used[j] = 1;
          cout << s[i] << d << s[j] << endl;
          break;
        }
    }
  return 0;
}
