#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<string> a(n);
  for (int i = (0); i < (n); i++) cin >> a[i];
  string d;
  cin >> d;
  long long sum = 0;
  for (int i = (0); i < (n); i++) {
    a[i] += d;
    sum += a[i].length();
  }
  long long len = sum / (n / 2) - 1;
  sort(a.begin(), a.end());
  map<string, long long> ind;
  map<long long, set<string>> m;
  for (int i = (0); i < (n); i++) {
    m[a[i].length()].insert(a[i]);
    ind[a[i]] = i;
  }
  vector<bool> used(n, false);
  vector<pair<string, string>> ans;
  for (int i = (0); i < (n); i++) {
    if (used[i]) continue;
    m[a[i].length()].erase(a[i]);
    used[i] = true;
    long long k = a[i].length();
    string s2 = *m[len - k + 1].begin();
    m[len - k + 1].erase(s2);
    used[ind[s2]] = true;
    ans.push_back({a[i], s2.substr(0, s2.length() - 1)});
  }
  for (int i = (0); i < (ans.size()); i++)
    cout << ans[i].first << ans[i].second << endl;
}
