#include <bits/stdc++.h>
const double eps = (1e-10);
using namespace std;
int dcmp(double a, double b) {
  return fabs(a - b) <= eps ? 0 : (a > b) ? 1 : -1;
}
int getBit(int num, int idx) { return ((num >> idx) & 1) == 1; }
int setBit1(int num, int idx) { return num | (1 << idx); }
int setBit0(int num, int idx) { return num & ~(1 << idx); }
int flipBit(int num, int idx) { return num ^ (1 << idx); }
int countNumBit1(int mask) {
  int ret = 0;
  while (mask) {
    mask &= (mask - 1);
    ++ret;
  }
  return ret;
}
int vis[10000 + 9];
int main() {
  int n;
  cin >> n;
  string s;
  vector<string> v;
  int siz = 0;
  for (int i = 0; i < n; i++) {
    cin >> s;
    siz += ((int)(s).size());
    v.push_back(s);
  }
  string sp;
  cin >> sp;
  int p = siz / (n / 2) + 1;
  for (int i = 0; i < n; i++) v[i] = v[i] + sp;
  sort(((v).begin()), ((v).end()));
  vector<string> v1, v2, v3;
  for (int i = 0; i < n; i++) {
    if (vis[i]) continue;
    vis[i] = 1;
    int need = p - ((int)(v[i]).size());
    v1.push_back(v[i]);
    for (int j = 0; j < n; j++) {
      if (!vis[j] && ((int)(v[j]).size()) == need + 1) {
        v2.push_back(v[j]);
        vis[j] = 1;
        break;
      }
    }
  }
  for (int i = 0; i < n / 2; i++) {
    v2[i].pop_back();
    string nw = v1[i] + v2[i];
    v3.push_back(nw);
  }
  for (int i = 0; i < n / 2; i++) cout << v3[i] << endl;
}
