#include <bits/stdc++.h>
using namespace std;
int N, n;
vector<string> v[11];
string s;
char d;
char c[16];
vector<string> ans;
int minn = 11, maxx = 0;
int main() {
  scanf("%d\n", &N);
  for (int i = 0; i < N; i++) {
    scanf("%s\n", &c);
    n = strlen(c);
    v[n].push_back(string(c));
    minn = min(minn, n);
    maxx = max(maxx, n);
  }
  scanf("%c\n", &d);
  for (int i = minn; i <= maxx; i++) sort(v[i].begin(), v[i].end());
  int l = minn, r = maxx, j = 0, k = 0;
  if (l == r) k++;
  for (int i = 0; i < N / 2; i++) {
    s = min(v[l][j] + d + v[r][k], v[r][k] + d + v[l][k]);
    ans.push_back(s);
    if (j + 1 < v[l].size())
      if (l != r)
        j++, k++;
      else
        j += 2, k += 2;
    else {
      j = 0;
      k = 0;
      for (l++, r--; l <= r; l++, r--)
        if (v[l].size() != 0) break;
      if (l == r) k++;
    }
  }
  sort(ans.begin(), ans.end());
  for (int i = 0; i < N / 2; i++) printf("%s\n", ans[i].c_str());
}
