#include <bits/stdc++.h>
using namespace std;
const int MN = 10000 + 10;
struct block {
  string s;
  int k;
  block() { k = -1; };
};
bool my1(block a, block b) { return (a.s < b.s); }
bool my2(block a, block b) { return (a.k < b.k); }
int main() {
  string ans[MN];
  block str[MN];
  char ch;
  int n, sum = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> str[i].s;
    sum += str[i].s.size();
  }
  int m = (sum + n / 2) / (n / 2);
  cin >> ch;
  sort(str, str + n, my1);
  for (int i = 0, curr = 0; i < n - 1; i++) {
    if (str[i].k != -1) continue;
    for (int j = i + 1; j < n; j++) {
      if (str[j].k != -1) continue;
      if (str[j].s.size() == m - str[i].s.size() - 1) {
        str[i].k = str[j].k = curr++;
        break;
      }
    }
  }
  sort(str, str + n, my2);
  for (int i = 0, j = 0; i < n - 1; i += 2)
    ans[j++] = min(str[i].s + ch + str[i + 1].s, str[i + 1].s + ch + str[i].s);
  sort(ans, ans + n / 2);
  for (int i = 0; i < n / 2; i++) cout << ans[i] << endl;
  return 0;
}
