#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
map<char, long long> vowel;
map<long long, vector<long long>> num1;
map<pair<long long, long long>, vector<long long>> num2;
void ins(long long& ind, string& s) {
  long long n = s.size();
  char lst;
  long long cnt = 0;
  for (long long i = (long long)0; i != (long long)n; i = i + 1) {
    if (vowel.find(s[i]) != vowel.end()) {
      cnt++;
      lst = s[i];
    }
  }
  num1[cnt].push_back(ind);
  num2[make_pair(cnt, vowel[lst])].push_back(ind);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<string> v(n);
  vowel['a'] = 0;
  vowel['e'] = 1;
  vowel['i'] = 2;
  vowel['o'] = 3;
  vowel['u'] = 4;
  vector<pair<long long, long long>> eqnal, eqn;
  vector<bool> vis(n, false);
  for (long long i = (long long)0; i != (long long)n; i = i + 1) {
    cin >> v[i];
    ins(i, v[i]);
  }
  for (auto x : num2) {
    auto y = x.second;
    long long z = y.size();
    if ((long long)z % 2 == 1) {
      z--;
    }
    for (long long i = (long long)0; i != (long long)z; i = i + 2) {
      eqnal.push_back(make_pair(y[i], y[i + 1]));
      vis[y[i]] = 1;
      vis[y[i + 1]] = 1;
    }
  }
  for (auto x : num1) {
    auto y = x.second;
    long long ind = -1;
    for (long long i = (long long)0; i != (long long)y.size(); i = i + 1) {
      if (vis[y[i]]) continue;
      if (ind == -1) {
        ind = y[i];
      } else {
        eqn.push_back(make_pair(ind, y[i]));
        vis[ind] = 1;
        vis[y[i]] = 1;
        ind = -1;
      }
    }
  }
  vector<pair<pair<long long, long long>, pair<long long, long long>>> ans;
  long long i = 0, j = 0;
  long long a = eqnal.size(), b = eqn.size();
  while (i != a && j != b) {
    ans.push_back(make_pair(eqn[j], eqnal[i]));
    i++;
    j++;
  }
  if (i == a) goto last;
  while (i < a - 1) {
    ans.push_back(make_pair(eqnal[i], eqnal[i + 1]));
    i += 2;
  }
last:
  cout << ans.size() << '\n';
  for (long long i = (long long)0; i != (long long)ans.size(); i = i + 1) {
    cout << v[ans[i].first.first] << " " << v[ans[i].second.first] << '\n';
    cout << v[ans[i].first.second] << " " << v[ans[i].second.second] << '\n';
  }
}
