#include <bits/stdc++.h>
using namespace std;
bool comp(pair<int, pair<int, char>> &a, pair<int, pair<int, char>> &b) {
  if (a.first == b.first) {
    return (a.second.second < b.second.second);
  } else
    return (a.first < b.first);
}
int main() {
  int n, i, j, c;
  cin >> n;
  string s[n];
  int f[n];
  char l[n], ch;
  vector<int> ans, op;
  vector<pair<int, pair<int, char>>> v, v1;
  for (i = 0; i < n; i++) {
    cin >> s[i];
    c = 0;
    for (j = 0; j < s[i].size(); j++) {
      if (s[i][j] == 'a' || s[i][j] == 'e' || s[i][j] == 'i' ||
          s[i][j] == 'o' || s[i][j] == 'u') {
        c++;
        ch = s[i][j];
      }
    }
    v.push_back({c, {i, ch}});
  }
  sort(v.begin(), v.end(), comp);
  for (i = 0; i < n - 1; i++) {
    if (v[i].first == v[i + 1].first) {
      if (v[i].second.second == v[i + 1].second.second) {
        ans.push_back(v[i].second.first);
        ans.push_back(v[i + 1].second.first);
        v[i].first = -1;
        v[i + 1].first = -1;
        i++;
      }
    }
  }
  for (i = 0; i < n; i++) {
    if (v[i].first != -1) {
      v1.push_back(v[i]);
    }
  }
  c = v1.size();
  for (i = 0; i < c - 1; i++) {
    if (v1[i].first == v1[i + 1].first) {
      op.push_back(v1[i].second.first);
      op.push_back(v1[i + 1].second.first);
      i++;
    }
  }
  c = min(op.size(), ans.size());
  cout << (c / 2 + (ans.size() - c) / 4) << endl;
  for (i = 0; i < c - 1; i++) {
    cout << s[op[i]] << " " << s[ans[i]] << endl;
    cout << s[op[i + 1]] << " " << s[ans[i + 1]] << endl;
    i++;
  }
  while ((ans.size() - i) / 4 > 0) {
    cout << s[ans[i]] << " " << s[ans[i + 2]] << endl;
    cout << s[ans[i + 1]] << " " << s[ans[i + 3]] << endl;
    i = i + 4;
  }
  return 0;
}
