#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
void PLAY() {
  cout << fixed << setprecision(10);
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  PLAY();
  int n;
  cin >> n;
  vector<pair<string, int>> v(n), with_s(n);
  int total_length = 0;
  for (int i = 0; i < n; i++) {
    cin >> v[i].first;
    v[i].second = i;
    total_length += (int)v[i].first.size();
  }
  char s;
  cin >> s;
  for (int i = 0; i < n; i++) {
    with_s[i] = v[i];
    with_s[i].first += s;
  }
  sort(v.begin(), v.end());
  sort(with_s.begin(), with_s.end());
  int N = n;
  n /= 2;
  int line_length = total_length / n;
  line_length++;
  int vis[10005] = {0};
  while (n--) {
    int idx = 0;
    while (idx < N && vis[with_s[idx].second]) idx++;
    vis[with_s[idx].second] = true;
    cout << with_s[idx].first;
    int idx2 = 0;
    for (; idx2 < N; idx2++) {
      if (!vis[v[idx2].second] &&
          ((int)v[idx2].first.size() + (int)with_s[idx].first.size() ==
           line_length))
        break;
    }
    vis[v[idx2].second] = true;
    cout << v[idx2].first << endl;
  }
  return 0;
}
