#include <bits/stdc++.h>
using namespace std;
bool isVowel(char s) {
  return (s == 'a' || s == 'e' || s == 'i' || s == 'o' || s == 'u');
}
int cVowel(string word) {
  int counts = 0;
  for (auto ch : word)
    if (isVowel(ch)) counts++;
  return counts;
}
char lVowel(string word) {
  for (int i = word.length() - 1; i >= 0; i--)
    if (isVowel(word[i])) return word[i];
  return '\0';
}
int main() {
  int n;
  cin >> n;
  vector<pair<int, pair<char, string>>> v(n);
  string temp;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    v[i].second.second = temp;
    v[i].first = cVowel(temp);
    v[i].second.first = lVowel(temp);
  }
  sort(v.begin(), v.end());
  vector<pair<string, string>> secw_set;
  for (int i = (int)v.size() - 1; i > 0; i--) {
    if (v[i].first == v[i - 1].first &&
        v[i].second.first == v[i - 1].second.first) {
      secw_set.push_back(make_pair(v[i].second.second, v[i - 1].second.second));
      auto it = v.begin() + i;
      v.erase(it);
      v.erase(it - 1);
      i--;
    }
  }
  if (secw_set.size() == 0) {
    cout << 0 << endl;
    return 0;
  }
  vector<pair<pair<string, string>, pair<string, string>>> ans;
  for (int i = (int)v.size() - 1; i > 0; i--) {
    if (v[i].first == v[i - 1].first) {
      ans.push_back(
          make_pair(make_pair(v[i].second.second, v[i - 1].second.second),
                    make_pair(secw_set[(int)secw_set.size() - 1].first,
                              secw_set[(int)secw_set.size() - 1].second)));
      auto it = v.begin() + i;
      v.erase(it);
      v.erase(it - 1);
      secw_set.erase(secw_set.end() - 1);
      i--;
      if ((int)secw_set.size() == 0) break;
    }
  }
  while ((int)secw_set.size() >= 2) {
    ans.push_back(
        make_pair(make_pair(secw_set[(int)secw_set.size() - 1].first,
                            secw_set[(int)secw_set.size() - 1].second),
                  make_pair(secw_set[(int)secw_set.size() - 2].first,
                            secw_set[(int)secw_set.size() - 2].second)));
    secw_set.erase(secw_set.end() - 1);
    secw_set.erase(secw_set.end() - 1);
  }
  cout << (int)ans.size() << endl;
  for (int i = 0; i < (int)ans.size(); i++) {
    cout << ans[i].first.first << " " << ans[i].second.first << endl;
    cout << ans[i].first.second << " " << ans[i].second.second << endl;
  }
  return 0;
}
