#include <bits/stdc++.h>
using namespace std;
const int maxl = 1000 * 10 + 5;
;
const int maxn = 30;
string a[maxl];
int n, sz;
char d;
vector<string> ans, tmp[maxn];
string cmp(const string& i, const string& j) {
  string _i = i + d + j, _j = j + d + i;
  if (_i < _j) return _i;
  return _j;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sz += a[i].size();
    tmp[a[i].size()].push_back(a[i]);
  }
  cin >> d;
  sz /= (n / 2);
  for (int i = 0; i < maxn; i++) sort(tmp[i].begin(), tmp[i].end());
  for (int i = 1; i <= sz - i; i++)
    for (int j = 0; j < tmp[i].size(); j++) {
      if (i == sz - i) {
        ans.push_back(cmp(tmp[i][j], tmp[sz - i][j + 1]));
        j++;
      } else
        ans.push_back(cmp(tmp[i][j], tmp[sz - i][j]));
    }
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << endl;
}
