#include <bits/stdc++.h>
using namespace std;
vector<string> s;
char sep;
int n;
bool used[10010];
int main() {
  cin >> n;
  int sum = 0;
  string ss;
  for (int i = 0; i < n; i++) {
    cin >> ss;
    s.push_back(ss);
    sum += ss.size();
  }
  cin >> sep;
  sort(s.begin(), s.end());
  sum /= n / 2;
  vector<string> ans;
  memset(used, false, sizeof(used));
  for (int i = 0; i < n; i++) {
    if (used[i] == false) {
      int len = sum - s[i].size();
      for (int j = i + 1; j < n; j++) {
        if (s[j].size() == len and used[j] == false) {
          string s1 = "", s2 = "", ss;
          s1 += s[i];
          s1 += sep;
          s1 += s[j];
          s2 += s[j];
          s2 += sep;
          s2 += s[i];
          ss = min(s1, s2);
          ans.push_back(ss);
          used[i] = used[j] = true;
          break;
        }
      }
    }
  }
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << "\n";
  return 0;
}
