#include <bits/stdc++.h>
#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:666000000")
using namespace std;
const int inf = (1 << 30) - 1;
const long double eps = 1e-9;
const long double pi = fabs(atan2(0.0, -1.0));
void ML(const bool v) {
  if (v) return;
  int *ass;
  for (;;) {
    ass = new int[2500000];
    for (int i = 0; i < 2500000; i++) ass[i] = rand();
  }
}
void TL(const bool v) {
  if (v) return;
  int *ass;
  ass = new int[250];
  for (;;) {
    for (int i = 0; i < 250; i++) ass[i] = rand();
  }
}
void PE(const bool v) {
  if (v) return;
  puts("ass 1 2 3 4 5 6 fuck");
  exit(0);
}
int n;
vector<string> s;
string fin;
int len = 0;
void LoAd() {
  char tmp[128];
  scanf("%d\n", &n);
  s.resize(n);
  for (int i = 0; i < n; i++) {
    scanf("%s\n", tmp);
    s[i] = tmp;
    len += s[i].size();
  }
  scanf("%s\n", tmp);
  fin = tmp;
  len = len * 2 / n + 2;
}
vector<string> res;
bool used[10400];
void SoLvE() {
  for (int i = 0; i < (int)s.size(); i++) s[i].push_back(fin[0]);
  sort(s.begin(), s.end());
  for (int i = 0; i < n; i++)
    if (!used[i]) {
      used[i] = true;
      string s1 = s[i];
      string s2;
      for (int j = i + 1;; j++)
        if (!used[j] && len - s1.size() == s[j].size()) {
          s2 = s[j];
          used[j] = true;
          break;
        }
      string u = s1 + s2;
      string v = s2 + s1;
      u.pop_back();
      v.pop_back();
      if (u < v)
        res.push_back(u);
      else
        res.push_back(v);
    }
  for (int i = 0; i < n / 2; i++) printf("%s\n", res[i].c_str());
}
int main() {
  srand((int)time(NULL));
  LoAd();
  SoLvE();
  return 0;
}
