import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.traits;
import std.typecons;

struct Word {
  string s;
  int last;
}

void main() {
  int[char] v = [
    'a' : 0,
    'e' : 1,
    'i' : 2,
    'o' : 3,
    'u' : 4
  ];
  int vowel (char c) {
    return v.get(c, -1);
  }
  immutable n = readln.strip.to!int;
  auto a = new string[n];
  size_t maxlen;
  foreach (i; 0 .. n) {
    a[i] = readln.strip;
    maxlen = max(maxlen, a[i].length);
  }
  auto l = new int[][5 * (maxlen+1)];
  foreach (i; 0 .. n) {
    int t, last = -1;
    foreach (c; a[i]) {
      int x = vowel (c);
      if (x >= 0){
        ++t;
        last = x;
      }
    }
    l[5 * t + last] ~= i;
  }
  alias T = Tuple!(int, int);
  T[] b;
  T[] c;
  foreach (k; 1 .. maxlen+1) {
    int[] tail;
    foreach (i; 0 .. 5) {
      auto idx = 5 * k + i;
      int cur = -1;
      foreach (j; l[idx]) {
        if (cur >= 0) {
          b ~= tuple (cur, j);
          cur = -1;
        } else {
          cur = j;
        }
      }
      if (cur >= 0) tail ~= cur;
    }
    foreach (i; 0 .. tail.length / 2) {
      c ~= tuple (tail[2*i], tail[2*i+1]);
    }
  }
  immutable bl = b.length;
  immutable cl = c.length;
  auto m = min (bl, (bl + cl) / 2);
  c ~= b[m .. $];
  writeln (m);
  foreach (i; 0 .. m) {
    int p12 = b[i][0], p22 = b[i][1];
    int p11 = c[i][0], p21 = c[i][1];
    writeln (a[p11], ' ', a[p12]);
    writeln (a[p21], ' ', a[p22]);
  }
}

