#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1);
string a[200002] = {};
long long b[200002] = {};
string s = "", ss = "";
long long n, m, k;
long long w;
long long ans;
long long mod = 1e9 + 7;
int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);
  int t = 1;
  while (t--) {
    cin >> n;
    for (int i = 0; i < n; i++) cin >> a[i];
    ;
    cin >> s;
    for (long long i = 0; i < n; i++) a[i] += s, k += a[i].size();
    k /= (n / 2);
    sort(a, a + n);
    for (long long i = 0; i < n; i++) {
      if (a[i] == "azhar univ") continue;
      for (long long j = i + 1; j < n; j++) {
        if (a[j] == "azhar univ") continue;
        if (a[i].size() + a[j].size() == k) {
          ss = a[i] + a[j].substr(0, a[j].size() - s.size());
          cout << ss << "\n";
          a[j] = "azhar univ";
          break;
        }
      }
    }
  }
  return 0;
}
