#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int len = 32;
const int maxn = 100000 + 10;
struct T {
  int id;
  string s;
};
int cmp(T a, T b) { return a.s < b.s; }
vector<T> a[15], b;
int main() {
  int i, n;
  while (~scanf("%d", &n)) {
    for (i = 0; i < 15; i++) a[i].clear();
    b.clear();
    int visit[10005] = {0};
    int sum = 0;
    for (i = 0; i < n; i++) {
      T c;
      c.id = i;
      cin >> c.s;
      int s = c.s.size();
      sum += s;
      a[s].push_back(c);
      b.push_back(c);
    }
    sum /= n / 2;
    sum++;
    getchar();
    char d;
    scanf("%c", &d);
    for (i = 1; i <= sum - 2; i++) {
      sort(a[i].begin(), a[i].end(), cmp);
    }
    for (i = 0; i < n; i++) b[i].s += d;
    sort(b.begin(), b.end(), cmp);
    int first = 0;
    for (i = 0; i < n / 2; i++) {
      int j;
      while (visit[b[first].id]) first++;
      cout << b[first].s;
      int lb = b[first].s.size();
      for (j = 0; j < n; j++)
        if (a[lb - 1][j].s + d == b[first].s) {
          a[lb - 1].erase(a[lb - 1].begin() + j);
          break;
        }
      cout << a[sum - lb][0].s << endl;
      visit[a[sum - lb][0].id] = 1;
      a[sum - lb].erase(a[sum - lb].begin());
      first++;
    }
  }
}
