#include <bits/stdc++.h>
using namespace std;
vector<string> ss[10], ans;
char d;
bool bigger(string s1, string s2) {
  if (s1 < s2) return true;
  return false;
}
int main() {
  int n, all = 0;
  cin >> n;
  string s;
  for (int i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 2 * ((0) < (n)) - 1) {
    cin >> s;
    ss[s.length() - 1].push_back(s);
    all += s.length();
  }
  cin >> d;
  all *= 2;
  all /= n;
  all -= 2;
  for (int i = (0) - ((0) > (10)); i != (10) - ((0) > (10));
       i += 2 * ((0) < (10)) - 1) {
    if (ss[i].size() > 1) {
      sort(ss[i].begin(), ss[i].end());
    }
  }
  for (int i = (0) - ((0) > (10)); i != (10) - ((0) > (10));
       i += 2 * ((0) < (10)) - 1) {
    while (ss[i].size()) {
      if (all != i * 2) {
        if (bigger(ss[i][0] + d + ss[all - i][0],
                   ss[all - i][0] + d + ss[i][0])) {
          ans.push_back(ss[i][0] + d + ss[all - i][0]);
        } else {
          ans.push_back(ss[all - i][0] + d + ss[i][0]);
        }
      } else {
        if (bigger(ss[i][0] + d + ss[i][1], ss[i][1] + d + ss[i][0])) {
          ans.push_back(ss[i][0] + d + ss[i][1]);
        } else {
          ans.push_back(ss[i][1] + d + ss[i][0]);
        }
      }
      ss[i].erase(ss[i].begin());
      ss[all - i].erase(ss[all - i].begin());
    }
  }
  sort(ans.begin(), ans.end());
  for (int i = (0) - ((0) > (n / 2)); i != (n / 2) - ((0) > (n / 2));
       i += 2 * ((0) < (n / 2)) - 1) {
    cout << ans[i] << endl;
  }
}
