#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
string s[10005];
int vis[10005];
int main() {
  ios::sync_with_stdio(0);
  int n, sum(0);
  cin >> n;
  for (long long i = 0; i < n; ++i) cin >> s[i], sum += s[i].size();
  char c;
  cin >> c;
  for (long long i = 0; i < n; ++i) s[i] += c;
  sort(s, s + n);
  sum = sum * 2 / n + 1;
  for (long long i = 0; i < n; ++i)
    if (!vis[i]) {
      cout << s[i];
      vis[i]++;
      for (long long j = i + 1; j < n; ++j)
        if (!vis[j] && sum - s[i].size() == s[j].size() - 1) {
          cout << s[j].substr(0, s[j].size() - 1) << '\n';
          vis[j]++;
          break;
        }
    }
}
