/* 2013-08-10 21:09:28.413622 */#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <string>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <ctime>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <cassert>
#include <bitset>

using namespace std;

int n;
string nam[10010];
char sep[5];
bool use[10010];

bool cmp(string t1, string t2)
{
	int l1 = t1.size();
	int l2 = t2.size();
	for (int i = 0; i < min(l1, l2); ++i)
		if (t1[i] != t2[i]) return (t1[i] < t2[i]);
	if (l1 < l2) return (sep[0] < t2[l1]);
	if (l1 > l2) return (t1[l2] < sep[0]);
	return false;
}

void work()
{
	int len = 0;
	for (int i = 0; i < n; ++i)
	{
		cin >> nam[i];
		len += nam[i].size();
	}
	scanf("%s",sep);
	len = (len / (n / 2)) + 1;
	sort(nam, nam + n, cmp);
	memset(use,0,sizeof(use));
	for (int i = 0; i < n; ++i)
		if (!use[i])
		{
			cout << nam[i] << sep[0];
			for (int j = i + 1; j < n; ++j)
				if ((int)nam[i].length() + (int)nam[j].length() + 1 == len && (!use[j]))
				{
					use[j] = true;
					cout << nam[j] << endl;
					break;
				}
		}
}

int main() {
	while (scanf("%d",&n) == 1)
	{
		work();
	}
	return 0;
}
