#include <bits/stdc++.h>
using namespace std;
bool is_vowel(char c) {
  return (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u');
}
pair<char, int> get_count_and_last_vowel(string s) {
  int res = 0;
  char last = ' ';
  for (int i = 0; i < s.length(); ++i) {
    if (is_vowel(s[i])) {
      last = s[i];
      res++;
    }
  }
  return make_pair(last, res);
}
int main() {
  int n;
  cin >> n;
  vector<string> words(n);
  for (int i = 0; i < n; ++i) {
    cin >> words[i];
  }
  map<int, map<char, vector<string>>> order;
  for (int i = 0; i < n; ++i) {
    pair<char, int> d = get_count_and_last_vowel(words[i]);
    order[d.second][d.first].push_back(words[i]);
  }
  vector<pair<string, string>> complete, semicomplete;
  for (auto& same_length : order) {
    for (auto& same_vowel : same_length.second) {
      while (same_vowel.second.size() >= 2) {
        string first_one = same_vowel.second.back();
        same_vowel.second.pop_back();
        string second_one = same_vowel.second.back();
        same_vowel.second.pop_back();
        complete.push_back(make_pair(first_one, second_one));
      }
    }
    vector<string> tmp;
    for (auto& same_vowel : same_length.second) {
      for (auto& word : same_vowel.second) {
        tmp.push_back(word);
        same_vowel.second.clear();
      }
      while (tmp.size() >= 2) {
        string first_one = tmp.back();
        tmp.pop_back();
        string second_one = tmp.back();
        tmp.pop_back();
        semicomplete.push_back(make_pair(first_one, second_one));
      }
    }
  }
  vector<pair<string, string>> res;
  while (!complete.empty() && !semicomplete.empty()) {
    auto sem = semicomplete.back();
    semicomplete.pop_back();
    auto com = complete.back();
    complete.pop_back();
    res.push_back(make_pair(sem.first, com.first));
    res.push_back(make_pair(sem.second, com.second));
  }
  while (complete.size() >= 2) {
    auto first_one = complete.back();
    complete.pop_back();
    auto second_one = complete.back();
    complete.pop_back();
    res.push_back(make_pair(first_one.first, second_one.first));
    res.push_back(make_pair(first_one.second, second_one.second));
  }
  cout << res.size() / 2 << endl;
  for (int i = 0; i < res.size(); ++i) {
    cout << res[i].first << " " << res[i].second << endl;
  }
}
