#include <bits/stdc++.h>
using namespace std;
set<string> all;
set<string> len[11];
string s[10000];
int LEN = 0;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    LEN += s[i].length();
  }
  LEN += n / 2;
  LEN /= (n / 2);
  char q;
  cin >> q;
  for (int i = 0; i < n; i++) {
    all.insert(s[i] + q);
    len[s[i].length()].insert(s[i]);
  }
  for (int i = 0; i < n / 2; i++) {
    string first = *all.begin();
    string second = *len[LEN - first.length()].begin();
    if (second == first.substr(0, first.length() - 1)) {
      len[LEN - first.length()].erase(len[LEN - first.length()].begin());
      second = *len[LEN - first.length()].begin();
      len[LEN - first.length()].insert(first.substr(0, first.length() - 1));
    }
    cout << first << second << endl;
    all.erase(first);
    all.erase(second + q);
    len[first.length() - 1].erase(first.substr(0, first.length() - 1));
    len[LEN - first.length()].erase(second);
  }
}
