/* 2013-08-10 12:15:58.637158 */#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>
#define MP make_pair
using namespace std;

const int MaxN = 10005;
string S[MaxN];
set<string> S2;
set<string> S1[20];

int main() {
	ios::sync_with_stdio(false);
	int N, L = 0;
	cin>>N;
	for (int i = 0; i < 11; i ++) S1[i].clear();
	S2.clear();
	for (int i = 0; i < N; i ++){
		cin>>S[i];	
		L += S[i].length();
		S1[S[i].length()].insert(S[i]);
	}
	L += (N >> 1);
	L /= (N >> 1);
	char D;
	cin>>D;
	for (int i = 0; i < N; i ++){
		string tmp = S[i] + D;	
		S2.insert(tmp);
	}
	for (int i = 0; i < (N >> 1); i ++){
		string Ans;	
		Ans = *S2.begin();
		string tmp = ""; 
		int LL = Ans.length();
		for (int j = 0; j < LL - 1; j ++) tmp += Ans[j];
		S1[tmp.length()].erase(tmp); S2.erase(Ans);
		tmp = *S1[L - Ans.length()].begin();
		Ans += tmp;
		S1[tmp.length()].erase(tmp);
		tmp += D;
		S2.erase(tmp);
		cout<<Ans<<endl;
	}
	return 0;
}
