#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)1e4 + 10;
int n;
string s1[MAXN], te;
int p[MAXN];
bool visit[MAXN];
int st[MAXN];
vector<pair<string, int> > len[15];
bool cmp(const int &a, const int &b) { return s1[a] < s1[b]; }
int main() {
  scanf("%d", &n);
  int total = 0;
  for (int i = 0; i < n; i++) {
    cin >> s1[i];
    int le = s1[i].length();
    len[le].push_back(make_pair(s1[i], i));
    total += le;
  }
  int each = total * 2 / n;
  cin >> te;
  for (int i = 0; i < n; i++) s1[i] += te;
  for (int i = 1; i <= 10; i++) sort(len[i].begin(), len[i].end());
  for (int i = 0; i < n; i++) p[i] = i;
  sort(p, p + n, cmp);
  memset(visit, false, sizeof(visit));
  for (int i = 0; i < n; i++) {
    int now = p[i];
    if (visit[now]) continue;
    visit[now] = true;
    cout << s1[now];
    int le = s1[now].length() - 1;
    le = each - le;
    while (visit[len[le][st[le]].second]) st[le]++;
    visit[len[le][st[le]].second] = true;
    cout << len[le][st[le]].first << endl;
  }
  return 0;
}
