#include <bits/stdc++.h>
using namespace std;
struct pelmen {
  string s;
  int num;
};
vector<pelmen> len[11];
pelmen strings[10001];
bool used[10001];
int kol[11];
int n;
bool cmp(pelmen a, pelmen b) { return a.s < b.s; }
int main() {
  cin >> n;
  int sumlen = 0;
  memset(used, false, sizeof(used));
  for (int i = 1; i <= n; i++) {
    cin >> strings[i].s;
    strings[i].num = i;
    len[strings[i].s.length()].push_back(strings[i]);
    sumlen += strings[i].s.length();
  }
  string d;
  cin >> d;
  for (int i = 1; i <= n; i++) strings[i].s += d;
  sort(strings + 1, strings + n + 1, &cmp);
  for (int i = 1; i <= 10; i++) {
    sort(len[i].begin(), len[i].end(), &cmp);
    kol[i] = 0;
  }
  int alllen = 2 * sumlen / n;
  int nowout = 0;
  int cur = 1;
  while (nowout < n / 2) {
    if (used[strings[cur].num]) {
      cur++;
      continue;
    }
    used[strings[cur].num] = true;
    string nowstring = strings[cur].s;
    int extra = alllen - strings[cur].s.length() + 1;
    int nn = kol[extra];
    while (used[len[extra][nn].num]) nn++;
    used[len[extra][nn].num] = true;
    kol[extra] = nn + 1;
    nowstring += len[extra][nn].s;
    cout << nowstring << endl;
    cur++;
    nowout++;
  }
  return 0;
}
