#include <bits/stdc++.h>
using namespace std;
bool isvowel(char c) { return strchr("aeiou", c) != NULL; }
char last(string s) {
  for (int i = s.size() - 1; i >= 0; i--)
    if (isvowel(s[i])) return s[i];
  return 'c';
}
int count(string s) {
  int cnt = 0;
  for (int i = 0; i < s.size(); i++) cnt += isvowel(s[i]);
  return cnt;
}
int main() {
  int n;
  cin >> n;
  map<pair<int, char>, vector<string> > mp;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    mp[{count(s), last(s)}].push_back(s);
  }
  vector<pair<string, string> > ans1, ans2;
  map<int, vector<string> > mp2;
  for (auto f : mp) {
    auto &v = f.second;
    while (v.size() >= 2) {
      ans2.push_back({v.back(), v[v.size() - 2]});
      v.pop_back();
      v.pop_back();
    }
    if (v.size()) mp2[f.first.first].push_back(v.back());
  }
  for (auto f : mp2) {
    auto &v = f.second;
    while (v.size() >= 2) {
      ans1.push_back({v.back(), v[v.size() - 2]});
      v.pop_back();
      v.pop_back();
    }
  }
  while (ans2.size() > ans1.size())
    ans1.push_back(ans2.back()), ans2.pop_back();
  cout << min(ans1.size(), ans2.size());
  for (int i = 0; i < min(ans1.size(), ans2.size()); i++)
    cout << endl
         << ans1[i].first << ' ' << ans2[i].first << endl
         << ans1[i].second << ' ' << ans2[i].second;
}
