#include <bits/stdc++.h>
using namespace std;
const int MAX = 500004;
long long p, pos1, pos2, q, x, l, ans = 0, r, y, z, k, n, m, t, d, c = 0,
                                  sum = 0;
long long int mn = 0x3f3f3f3f, len, cnt = 1, mx = -1000;
std::vector<int> v[MAX];
string s[10004], s1, s2;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    m += s[i].size();
  }
  cin >> s1;
  int len = 2 * m / n;
  for (int i = 0; i < n; i++) s[i] += s1;
  sort(s, s + n);
  int a[n];
  memset(a, (0), sizeof(a));
  for (int i = 0; i < n / 2; i++) {
    for (int j = 0; j < n; j++) {
      if (!a[j]) {
        cout << s[j];
        x = s[j].size();
        ++a[j];
        break;
      }
    }
    for (int j = 0; j < n; j++) {
      if (!a[j] and s[j].size() == len - x + 2) {
        cout << s[j].substr(0, s[j].size() - 1);
        ++a[j];
        break;
      }
    }
    cout << endl;
  }
  return 0;
}
