#include <bits/stdc++.h>
using namespace std;
vector<string> t[12], v, ans;
map<string, bool> mymap;
int main() {
  int n;
  string str, s1, s2, d;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> str;
    t[str.size()].push_back(str);
  }
  for (int i = 1; i <= 10; i++) sort(t[i].begin(), t[i].end());
  cin >> d;
  int cnt, i, j, a, b;
  i = 1;
  j = 10;
  a = b = cnt = 0;
  while (cnt < n / 2) {
    if (a == t[i].size()) {
      i++;
      a = 0;
      continue;
    }
    if (b == t[j].size()) {
      j--;
      b = 0;
      continue;
    }
    if (i == j && b <= a) {
      b++;
      continue;
    }
    if (mymap[t[i][a]]) {
      a++;
      continue;
    }
    if (mymap[t[j][b]]) {
      b++;
      continue;
    }
    s1 = t[i][a] + d + t[j][b];
    s2 = t[j][b] + d + t[i][a];
    if (s1 < s2)
      ans.push_back(s1);
    else
      ans.push_back(s2);
    mymap[t[i][a]] = mymap[t[j][b]] = true;
    a++;
    b++;
    cnt++;
  }
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << endl;
  return 0;
}
