#include <bits/stdc++.h>
using namespace std;
string vowels = "aeiou";
int id[256];
const int N = 1e6 + 7;
vector<string> str[5][N];
int fr[N];
int main() {
  memset(id, -1, sizeof id);
  for (int i = 0; i < vowels.size(); i++) id[vowels[i]] = i;
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    string s;
    cin >> s;
    char last;
    int cnt = 0;
    for (char c : s) {
      if (id[c] == -1) continue;
      last = c;
      cnt++;
    }
    str[id[last]][cnt].push_back(s);
    fr[cnt]++;
  }
  int mx = 0;
  for (int i = 0; i < N; i++) mx += fr[i] / 2;
  mx /= 2;
  vector<pair<string, string>> ans;
  for (int i = 0; i < 5; i++)
    for (int j = 0; j < N; j++) {
      while (ans.size() < mx && str[i][j].size() >= 2) {
        ans.push_back({});
        ans.back().first = str[i][j].back();
        str[i][j].pop_back();
        ans.back().second = str[i][j].back();
        str[i][j].pop_back();
      }
    }
  vector<pair<string, string>> pairs;
  for (int i = 0; i < N; i++) {
    vector<string> left;
    for (int j = 0; j < 5; j++) {
      for (string s : str[j][i]) left.push_back(s);
      str[j][i].clear();
    }
    if (left.size() % 2) left.pop_back();
    for (int i = 0; i < left.size(); i += 2)
      pairs.push_back({left[i], left[i + 1]});
  }
  assert(pairs.size() >= ans.size());
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << pairs[i].first << " " << ans[i].first << "\n";
    cout << pairs[i].second << " " << ans[i].second << "\n";
  }
}
