#include <bits/stdc++.h>
using namespace std;
inline int cmp(double a, double b = 0.0) {
  if (fabs(a - b) <= (1e-8)) return 0;
  if (a < b) return -1;
  return 1;
}
vector<string> v[21];
vector<string> c;
int main() {
  int n;
  cin >> n;
  string sep;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    v[int(s.size())].push_back(s);
  }
  for (int i = 1; i <= 10; i++) sort(v[i].begin(), v[i].end());
  cin >> sep;
  string mins = "a";
  int mini = -1;
  mins[0] = -1;
  for (int i = 2; i <= 20; i++) {
    bool ok = true;
    for (int j = 1; j <= 10; j++) {
      if (int(v[j].size()) == 0) continue;
      if (i - j < 0 || (j == i - j && int(v[j].size()) % 2 != 0) ||
          int(v[j].size()) != int(v[i - j].size())) {
        ok = false;
        break;
      }
    }
    if (!ok) continue;
    c.clear();
    for (int j = 1; j <= 10; j++) {
      if (int(v[j].size()) == 0 || j > i - j) continue;
      if (j != i - j) {
        for (int k = 0; k < int(v[j].size()); k++) {
          string s = v[j][k] + sep + v[i - j][k];
          string s1 = v[i - j][k] + sep + v[j][k];
          c.push_back(min(s, s1));
        }
      } else {
        for (int k = 0; k < int(v[j].size()) / 2; k++) {
          c.push_back(v[j][2 * k] + sep + v[j][2 * k + 1]);
        }
      }
    }
    sort(c.begin(), c.end());
    string s;
    for (typeof(c.begin()) it = c.begin(); it != c.end(); it++) s += *it;
    if (s < mins) {
      mins = s;
      mini = i;
    }
  }
  mini++;
  for (int i = 0; i < n / 2; i++) {
    cout << mins.substr(i * mini, mini) << endl;
  }
  return 0;
}
