#include <bits/stdc++.h>
#pragma comment(linker, "/stack:64000000")
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> p;
  int need = 0;
  for (int(i) = 0; (i) < (n); (i)++) {
    string s;
    cin >> s;
    p.push_back(s);
    need += (int)(s).size();
  }
  need /= (n / 2);
  char c;
  cin >> c;
  for (int(i) = 0; (i) < (n); (i)++) p[i] += c;
  sort((p).begin(), (p).end());
  vector<set<string> > v(11);
  for (int(i) = 0; (i) < (n); (i)++) {
    v[(int)(p[i]).size() - 1].insert(p[i]);
  }
  vector<string> r;
  set<string> used;
  for (int(i) = 0; (i) < (n); (i)++) {
    if (used.count(p[i])) continue;
    v[(int)(p[i]).size() - 1].erase(p[i]);
    used.insert(p[i]);
    string s = p[i].substr(0, (int)(p[i]).size() - 1);
    string t = *v[need - (int)(s).size()].begin();
    v[need - (int)(s).size()].erase(t);
    used.insert(t);
    t = t.substr(0, (int)(t).size() - 1);
    r.push_back(s + c + t);
  }
  assert((int)(r).size() == n / 2);
  for (int(i) = 0; (i) < ((int)(r).size()); (i)++) cout << r[i] << "\n";
  return 0;
}
