#include <bits/stdc++.h>
using namespace std;
char vowel[] = {'a', 'e', 'o', 'i', 'u'};
struct Word {
  string str;
  int vowel_num;
  char last_vowel;
  Word() {}
  Word(string a) : str(a), vowel_num(0) { Search(a); }
  bool isVowel(char a) {
    for (int i = 0; i < 5; i++) {
      if (vowel[i] == a) return true;
    }
    return false;
  }
  void Search(string a) {
    bool isFind = false;
    for (int i = a.length() - 1; i >= 0; i--) {
      if (isVowel(a[i])) {
        if (!isFind) {
          isFind = true;
          last_vowel = a[i];
        }
        vowel_num++;
      }
    }
  }
};
bool cmp(Word a, Word b) {
  return (a.vowel_num < b.vowel_num) ||
         (a.vowel_num == b.vowel_num && a.last_vowel < b.last_vowel);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<Word> word(n);
  for (int i = 0; i < n; i++) {
    string str;
    cin >> str;
    word[i] = Word(str);
  }
  sort(word.begin(), word.end(), cmp);
  vector<vector<Word> > divide;
  vector<Word> cur;
  for (int i = 0; i < n;) {
    cur.resize(0);
    char hl = word[i].last_vowel;
    int hn = word[i].vowel_num;
    cur.push_back(word[i]);
    while (++i < n && hl == word[i].last_vowel && hn == word[i].vowel_num) {
      cur.push_back(word[i]);
    }
    divide.push_back(cur);
  }
  vector<pair<string, string> > ans;
  for (int i = 0; i < divide.size(); i++) {
    while (divide[i].size() >= 2) {
      string str1 = divide[i].back().str;
      divide[i].pop_back();
      string str2 = divide[i].back().str;
      divide[i].pop_back();
      ans.push_back(make_pair(str1, str2));
    }
  }
  int ans_num = 0;
  vector<bool> isUse(ans.size());
  string str1, str2;
  int sn1 = -1, sn2 = -1;
  for (int i = 0; i < divide.size() && ans_num < ans.size(); i++) {
    if (divide[i].size() && sn1 == -1) {
      str1 = divide[i].back().str;
      sn1 = divide[i].back().vowel_num;
      divide[i].pop_back();
    }
    if (divide[i].size() && sn2 == -1) {
      sn2 = divide[i].back().vowel_num;
      str2 = divide[i].back().str;
      divide[i].pop_back();
    }
    if (sn1 == -1 || sn2 == -1) {
      continue;
    } else {
      if (sn1 == sn2) {
        ans[ans_num].first = str1 + " " + ans[ans_num].first;
        ans[ans_num].second = str2 + " " + ans[ans_num].second;
        ans_num++;
        sn1 = sn2 = -1;
      } else {
        str1 = str2;
        str2 = "";
        sn1 = sn2;
        sn2 = -1;
      }
    }
  }
  while (ans_num < ans.size()) {
    ans[ans_num].first += (" " + ans.back().first);
    ans[ans_num].second += (" " + ans.back().second);
    ans.pop_back();
    ans_num++;
  }
  cout << ans.size() << '\n';
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i].first << '\n' << ans[i].second << '\n';
  }
}
