#include <bits/stdc++.h>
using namespace std;
vector<string> words;
vector<int> M[1000005][5];
vector<pair<int, int> > rgt;
vector<int> lft[1000005];
int ans[100005][4];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    string tmp;
    cin >> tmp;
    words.push_back(tmp);
    char last = -1;
    int cnt = 0;
    for (auto x : tmp) {
      if (x == 'a' || x == 'i' || x == 'e' || x == 'u' || x == 'o') {
        cnt++;
        last = x;
      }
    }
    if (last == 'a') M[cnt][0].push_back(i);
    if (last == 'i') M[cnt][1].push_back(i);
    if (last == 'e') M[cnt][2].push_back(i);
    if (last == 'u') M[cnt][3].push_back(i);
    if (last == 'o') M[cnt][4].push_back(i);
  }
  for (int i = 0; i < 1000005; i++) {
    for (int j = 0; j < 5; j++) {
      while (M[i][j].size() > 1) {
        int a = M[i][j][M[i][j].size() - 1];
        M[i][j].pop_back();
        int b = M[i][j][M[i][j].size() - 1];
        M[i][j].pop_back();
        rgt.push_back(pair<int, int>(a, b));
      }
      if (M[i][j].size() > 0) {
        lft[i].push_back(M[i][j][0]);
        M[i][j].pop_back();
      }
    }
  }
  int ansC = 0;
  for (int i = 0, j = 0; i < (int)rgt.size(); i++) {
    while (j < 1000005 && lft[j].size() < 2) {
      j++;
    }
    if (j == 1000005) {
      if (i + 1 < (int)rgt.size()) {
        ans[ansC][0] = rgt[i].first;
        ans[ansC][1] = rgt[i].second;
        i++;
        ans[ansC][2] = rgt[i].first;
        ans[ansC][3] = rgt[i].second;
        ansC++;
      } else {
        break;
      }
    } else if (lft[j].size() > 1) {
      ans[ansC][0] = lft[j][lft[j].size() - 1];
      lft[j].pop_back();
      ans[ansC][1] = lft[j][lft[j].size() - 1];
      lft[j].pop_back();
      ans[ansC][2] = rgt[i].first;
      ans[ansC][3] = rgt[i].second;
      ansC++;
    }
  }
  printf("%d\n", ansC);
  for (int i = 0; i < ansC; i++) {
    cout << words[ans[i][0]] << " " << words[ans[i][2]] << endl;
    cout << words[ans[i][1]] << " " << words[ans[i][3]] << endl;
  }
  return 0;
}
