#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000000,100000000000")
const long long INF = 1000000007;
const long double cp = 2 * asin(1.0);
const long double eps = 1e-9;
const long long mod = 1000000007;
using namespace std;
string d;
bool comp(string a, string b) { return a + d + b < b + d + a; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n, sl = 0, ln;
  cin >> n;
  vector<string> s(n);
  for (int(i) = 0; (i) < (n); i++) {
    cin >> s[i];
    sl += s[i].size();
  }
  cin >> d;
  ln = sl / (n / 2) + 1;
  sort((s).begin(), (s).end(), &comp);
  vector<char> used(n, false);
  for (int(i) = 0; (i) < (n); i++) {
    if (!used[i]) {
      for (int(j) = (i + 1); (j) <= (n - 1); j++) {
        if (s[i].size() + s[j].size() + d.size() == ln && !used[j]) {
          used[i] = true;
          used[j] = true;
          cout << s[i] << d << s[j] << endl;
          break;
        }
      }
    }
  }
  return 0;
}
