#include <bits/stdc++.h>
using namespace std;
vector<string> str[11];
bool cmp(string a, string b) {
  if (a + b < b + a)
    return true;
  else
    return false;
}
int main() {
  int n;
  cin >> n;
  string s;
  getline(cin, s);
  int sr = 0;
  for (int i = 0; i < n; i++) {
    getline(cin, s);
    str[s.length()].push_back(s);
    sr += s.length();
  }
  getline(cin, s);
  sr = sr / (n / 2);
  for (int i = 0; i < 11; i++) {
    sort(str[i].begin(), str[i].end());
  }
  vector<string> res;
  for (int i = 1; i <= sr / 2 - (sr + 1) % 2; i++) {
    for (int j = 0; j < str[i].size(); j++) {
      if (str[i][j] + s + str[sr - i][j] < str[sr - i][j] + s + str[i][j]) {
        res.push_back(str[i][j] + s + str[sr - i][j]);
      } else {
        res.push_back(str[sr - i][j] + s + str[i][j]);
      }
    }
  }
  if (sr % 2 == 0) {
    for (int i = 0; i < str[sr / 2].size(); i += 2) {
      if (str[sr / 2][i] + s + str[sr / 2][i + 1] <
          str[sr / 2][i + 1] + s + str[sr / 2][i]) {
        res.push_back(str[sr / 2][i] + s + str[sr / 2][i + 1]);
      } else {
        res.push_back(str[sr / 2][i + 1] + s + str[sr / 2][i]);
      }
    }
  }
  sort(res.begin(), res.end());
  for (int i = 0; i < n / 2; i++) {
    cout << res[i] << endl;
  }
  return 0;
}
