#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  map<pair<int, int>, vector<string> > m;
  vector<pair<string, string> > an;
  vector<pair<pair<string, string>, pair<string, string> > > fians;
  map<string, int> co;
  multiset<pair<int, string> > ms;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    char x;
    int c = 0;
    for (int j = 0; j < s.size(); j++) {
      if (s[j] == 'a' || s[j] == 'e' || s[j] == 'i' || s[j] == 'o' ||
          s[j] == 'u')
        c++, x = s[j];
    }
    m[make_pair(c, x)].push_back(s);
    co[s] = c;
  }
  map<pair<int, int>, vector<string> >::iterator it;
  for (it = m.begin(); it != m.end(); it++) {
    vector<string> x = it->second;
    for (int i = 0; i < x.size(); i += 2) {
      if (i + 1 < x.size())
        an.push_back({x[i], x[i + 1]});
      else
        ms.insert({co[x[i]], x[i]});
    }
  }
  m.clear();
  for (int i = 0; i < an.size(); i++) {
    if (ms.empty()) {
      if (i + 1 < an.size()) {
        fians.push_back(make_pair(make_pair(an[i].first, an[i + 1].first),
                                  make_pair(an[i].second, an[i + 1].second)));
        i++;
      }
    } else {
      string s1, s2;
      int f = 0;
      while (!ms.empty()) {
        multiset<pair<int, string> >::iterator it = ms.begin();
        pair<int, string> p = *(it);
        ms.erase(it);
        if (!(ms.empty())) {
          pair<int, string> p1 = *(ms.begin());
          if (p1.first == p.first) {
            s1 = p1.second;
            s2 = p.second;
            f = 1;
            ms.erase(ms.begin());
            break;
          }
        }
      }
      if (f)
        fians.push_back(
            make_pair(make_pair(s1, an[i].first), make_pair(s2, an[i].second)));
      else {
        if (i + 1 < an.size())
          fians.push_back({{an[i].first, an[i + 1].first},
                           {an[i].second, an[i + 1].second}}),
              i++;
      }
    }
  }
  cout << fians.size() << endl;
  for (int i = 0; i < fians.size(); i++) {
    cout << fians[i].first.first << " " << fians[i].first.second << endl;
    cout << fians[i].second.first << " " << fians[i].second.second << endl;
  }
  return 0;
}
