#include <bits/stdc++.h>
using namespace std;
string s[10050];
int a[10050];
bool cmp(string s1, string s2) { return s1.compare(s2) < 0; }
int main() {
  int n;
  char b;
  int num1 = 0, num = 0;
  memset(a, 0, sizeof(a));
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  cin >> b;
  for (int i = 0; i < n; i++) {
    s[i] = s[i] + b;
    num1 += s[i].length();
  }
  num = num1 / (n / 2);
  sort(s, s + n, cmp);
  for (int i = 0; i < n; i++) {
    if (a[i] == 0)
      for (int j = i + 1; j < n; j++) {
        if (a[j] == 0) {
          if ((s[i].length() + s[j].length()) == num) {
            cout << s[i];
            string::iterator it = s[j].begin();
            s[j].erase(it + s[j].length() - 1);
            cout << s[j] << endl;
            a[i] = 1;
            a[j] = 1;
            break;
          }
        }
      }
  }
  return 0;
}
