#include <bits/stdc++.h>
using namespace std;
const double eps = 1.0e-11;
const double pi = acos(-1.0);
const int N = 10100;
string data[N];
set<string> s[12];
int main() {
  int n;
  cin >> n;
  string x;
  int len = 0;
  for (long long i = 0; i < n; i++) {
    cin >> x;
    len += (int)(x).size();
    data[i] = x;
    s[(int)(x).size()].insert(x);
  }
  len = 2 * len / n + 1;
  char d;
  cin >> d;
  for (long long i = 0; i < n; i++) s[0].insert(data[i] + string(1, d));
  for (long long i = 0; i < n / 2; i++) {
    x = *s[0].begin();
    cout << x;
    s[0].erase(x);
    s[(int)(x).size() - 1].erase(x.substr(0, (int)(x).size() - 1));
    int tmp = len - (int)(x).size();
    x = *s[tmp].begin();
    cout << x << endl;
    s[tmp].erase(x);
    s[0].erase(x + string(1, d));
  }
  return 0;
}
