#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  string s;
  map<pair<char, int>, string> tmp;
  vector<pair<pair<string, string>, pair<string, string>>> ans;
  pair<string, string> p1, p2;
  multimap<string, string> sec;
  map<int, vector<string>> fst;
  vector<int> temp;
  for (int i = 0; i < n; ++i) {
    int cnt = 0;
    char vow;
    cin >> s;
    for (int i = 0; i < s.length(); ++i)
      if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' ||
          s[i] == 'u') {
        ++cnt;
        vow = s[i];
      }
    if (tmp.count({vow, cnt})) {
      sec.insert({s, tmp[{vow, cnt}]});
      tmp.erase({vow, cnt});
    } else
      tmp.insert({{vow, cnt}, s});
  }
  for (auto it : tmp) fst[it.first.second].push_back(it.second);
  for (auto it : fst)
    if (it.second.size() < 2) temp.push_back(it.first);
  for (auto it : temp) fst.erase(it);
  while (!fst.empty() && !sec.empty()) {
    p1.first = fst.begin()->second.back();
    fst.begin()->second.pop_back();
    p1.second = fst.begin()->second.back();
    fst.begin()->second.pop_back();
    if (fst.begin()->second.size() < 2) fst.erase(fst.begin());
    p2 = *sec.begin();
    sec.erase(sec.begin());
    ans.push_back({p1, p2});
  }
  while (sec.size() > 1) {
    p1 = *sec.begin();
    sec.erase(sec.begin());
    p2 = *sec.begin();
    sec.erase(sec.begin());
    ans.push_back({p1, p2});
  }
  cout << ans.size() << '\n';
  for (auto it : ans)
    cout << it.first.first << " " << it.second.first << '\n'
         << it.first.second << " " << it.second.second << '\n';
}
