import java.util.*;
import java.util.stream.Collectors;

public class Promlemo2 {
    public static void main(String[] args) {
        solve();

    }
    static List<String> lyrics = new ArrayList<>();
    private static void solve() {
        Scanner scanner = new Scanner(System.in);
        int wordsCount = scanner.nextInt();
        scanner.nextLine();
        List<Word> wordsList = new ArrayList<>();

        for(int i=0; i<wordsCount;i++){
            Word word = new Word(scanner.nextLine());
            wordsList.add(word);
        }

        List<ValidCombo> secondWordsList =  findValidSecondWords(wordsList);
        List<ValidCombo> firstWordsList = findValidFirstWords(wordsList);

        while (secondWordsList.size() > firstWordsList.size() + 1){
            ValidCombo validCombo = secondWordsList.get(0);
            firstWordsList.add(validCombo);
            secondWordsList.remove(validCombo);
        }

        for (int i = 0; i < secondWordsList.size() && i < firstWordsList.size(); i++) {
           constructLyrics(firstWordsList.get(i),secondWordsList.get(i));
        }

        System.out.println(lyrics.size());
        lyrics.forEach(System.out::println);

    }

    private static List<ValidCombo> findValidFirstWords(List<Word> words) {
        List<ValidCombo> combos = new ArrayList<>();
        for (int word = 0; word < words.size(); word++) {
            for (int secondWord = word+1; secondWord < words.size(); secondWord++) {
                Word word1 = words.get(word);
                Word word2 = words.get(secondWord);
                if(word1.getVowelCount() == word2.getVowelCount()){
                    combos.add(new ValidCombo(word1, word2));
                    words.remove(word1);
                    words.remove(word2);
                    word = 0;
                }
            }
        }
        return combos;
    }

    private static List<ValidCombo> findValidSecondWords(List<Word> words) {
        List<ValidCombo> combos = new ArrayList<>();
        for (int word = 0; word < words.size(); word++) {
            for (int secondWord = word+1; secondWord < words.size(); secondWord++) {
                Word word1 = words.get(word);
                Word word2 = words.get(secondWord);
                if(word1.getVowelCount() == word2.getVowelCount()
                        && word1.getEndingVowel() == word2.getEndingVowel()){
                    combos.add(new ValidCombo(word1, word2));
                    words.remove(word1);
                    words.remove(word2);
                    word = 0;
                }
            }
        }
        return combos;
    }

    static void constructLyrics(ValidCombo firstWords, ValidCombo secondWords){
        lyrics.add(firstWords.word1.toString() + " " + secondWords.word1.toString() +
                "\n" + firstWords.word2.toString() + " " + secondWords.word2.toString());
    }

    private static class ValidCombo {
        Word word1;
        Word word2;

        public ValidCombo(Word word1, Word word2){
            this.word1 = word1;
            this.word2 = word2;
        }

        @Override
        public String toString() {
            return word1.toString() + ":" + word2.toString();
        }
    }

    private static class Word{
        private int vowelCount;

        private char endingVowel;
        private String line;
        public Word(String line){
            this.line = line;
            vowelCount = 0;
            for(char c : line.toCharArray()){
                if(c == 'a' || c == 'e' || c == 'o' || c == 'u' || c == 'i'){
                    vowelCount++;
                    endingVowel = c;
                }
            }
        }

        @Override
        public String toString(){
            return line;
        }

        public int getVowelCount() {
            return vowelCount;
        }

        public char getEndingVowel() {
            return endingVowel;
        }

    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class Promlemo2 {
    public static void main(String[] args) throws IOException {
        solve();

    }
    static List<String> lyrics = new ArrayList<>();
    private static void solve() throws IOException {
        PrintWriter printWriter = new PrintWriter(System.out);
        InputStreamReader reader = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(reader);

        int wordsCount = Integer.parseInt(br.readLine());
        List<Word> wordsList = new ArrayList<>();

        for(int i=0; i<wordsCount;i++){
            Word word = new Word(br.readLine());
            wordsList.add(word);
        }

        List<ValidCombo> secondWordsList =  findValidSecondWords(wordsList);
        List<ValidCombo> firstWordsList = findValidFirstWords(wordsList);

        while (secondWordsList.size() > firstWordsList.size() + 1){
            ValidCombo validCombo = secondWordsList.get(0);
            firstWordsList.add(validCombo);
            secondWordsList.remove(validCombo);
        }

        for (int i = 0; i < secondWordsList.size() && i < firstWordsList.size(); i++) {
           constructLyrics(firstWordsList.get(i),secondWordsList.get(i));
        }

        printWriter.println(lyrics.size());
        lyrics.forEach(printWriter::println);

    }

    private static List<ValidCombo> findValidFirstWords(List<Word> words) {
        List<ValidCombo> combos = new ArrayList<>();
        for (int word = 0; word < words.size(); word++) {
            for (int secondWord = word+1; secondWord < words.size(); secondWord++) {
                Word word1 = words.get(word);
                Word word2 = words.get(secondWord);
                if(word1.getVowelCount() == word2.getVowelCount()){
                    combos.add(new ValidCombo(word1, word2));
                    words.remove(word1);
                    words.remove(word2);
                    word = 0;
                }
            }
        }
        return combos;
    }

    private static List<ValidCombo> findValidSecondWords(List<Word> words) {
        List<ValidCombo> combos = new ArrayList<>();
        for (int word = 0; word < words.size(); word++) {
            for (int secondWord = word+1; secondWord < words.size(); secondWord++) {
                Word word1 = words.get(word);
                Word word2 = words.get(secondWord);
                if(word1.getVowelCount() == word2.getVowelCount()
                        && word1.getEndingVowel() == word2.getEndingVowel()){
                    combos.add(new ValidCombo(word1, word2));
                    words.remove(word1);
                    words.remove(word2);
                    word = 0;
                }
            }
        }
        return combos;
    }

    static void constructLyrics(ValidCombo firstWords, ValidCombo secondWords){
        lyrics.add(firstWords.word1.toString() + " " + secondWords.word1.toString() +
                "\n" + firstWords.word2.toString() + " " + secondWords.word2.toString());
    }

    private static class ValidCombo {
        Word word1;

        Word word2;

        public ValidCombo(Word word1, Word word2){
            this.word1 = word1;
            this.word2 = word2;
        }

        @Override
        public String toString() {
            return word1.toString() + ":" + word2.toString();
        }
    }

    private static class Word{
        private int vowelCount;

        private char endingVowel;
        private String line;

        public Word(String line){
            this.line = line;
            vowelCount = 0;
            for(char c : line.toCharArray()){
                if(c == 'a' || c == 'e' || c == 'o' || c == 'u' || c == 'i'){
                    vowelCount++;
                    endingVowel = c;
                }
            }
        }

        @Override
        public String toString(){
            return line;
        }

        public int getVowelCount() {
            return vowelCount;
        }

        public char getEndingVowel() {
            return endingVowel;
        }

    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class Promlemo2 {
    public static void main(String[] args) throws IOException {
        solve();

    }
    static List<String> lyrics = new ArrayList<>();
    private static void solve() throws IOException {
        PrintWriter printWriter = new PrintWriter(System.out);
        InputStreamReader reader = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(reader);

        int wordsCount = Integer.parseInt(br.readLine());
        List<Word> wordsList = new ArrayList<>();

        for(int i=0; i<wordsCount;i++){
            Word word = new Word(br.readLine());
            wordsList.add(word);
        }

        List<ValidCombo> secondWordsList =  findValidSecondWords(wordsList);
        List<ValidCombo> firstWordsList = findValidFirstWords(wordsList);

        while (secondWordsList.size() > firstWordsList.size() + 1){
            ValidCombo validCombo = secondWordsList.get(0);
            firstWordsList.add(validCombo);
            secondWordsList.remove(validCombo);
        }

        for (int i = 0; i < secondWordsList.size() && i < firstWordsList.size(); i++) {
           constructLyrics(firstWordsList.get(i),secondWordsList.get(i));
        }

        printWriter.println(lyrics.size());
        lyrics.forEach(printWriter::println);

        printWriter.flush();
    }

    private static List<ValidCombo> findValidFirstWords(List<Word> words) {
        List<ValidCombo> combos = new ArrayList<>();
        for (int word = 0; word < words.size(); word++) {
            for (int secondWord = word+1; secondWord < words.size(); secondWord++) {
                Word word1 = words.get(word);
                Word word2 = words.get(secondWord);
                if(word1.getVowelCount() == word2.getVowelCount()){
                    combos.add(new ValidCombo(word1, word2));
                    words.remove(word1);
                    words.remove(word2);
                    word = 0;
                }
            }
        }
        return combos;
    }

    private static List<ValidCombo> findValidSecondWords(List<Word> words) {
        List<ValidCombo> combos = new ArrayList<>();
        for (int word = 0; word < words.size(); word++) {
            for (int secondWord = word+1; secondWord < words.size(); secondWord++) {
                Word word1 = words.get(word);
                Word word2 = words.get(secondWord);
                if(word1.getVowelCount() == word2.getVowelCount()
                        && word1.getEndingVowel() == word2.getEndingVowel()){
                    combos.add(new ValidCombo(word1, word2));
                    words.remove(word1);
                    words.remove(word2);
                    word = 0;
                }
            }
        }
        return combos;
    }

    static void constructLyrics(ValidCombo firstWords, ValidCombo secondWords){
        lyrics.add(firstWords.word1.toString() + " " + secondWords.word1.toString() +
                "\n" + firstWords.word2.toString() + " " + secondWords.word2.toString());
    }

    private static class ValidCombo {
        Word word1;

        Word word2;

        public ValidCombo(Word word1, Word word2){
            this.word1 = word1;
            this.word2 = word2;
        }

        @Override
        public String toString() {
            return word1.toString() + ":" + word2.toString();
        }
    }

    private static class Word{
        private int vowelCount;

        private char endingVowel;
        private String line;

        public Word(String line){
            this.line = line;
            vowelCount = 0;
            for(char c : line.toCharArray()){
                if(c == 'a' || c == 'e' || c == 'o' || c == 'u' || c == 'i'){
                    vowelCount++;
                    endingVowel = c;
                }
            }
        }

        @Override
        public String toString(){
            return line;
        }

        public int getVowelCount() {
            return vowelCount;
        }

        public char getEndingVowel() {
            return endingVowel;
        }

    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class Promlemo2 {
    public static void main(String[] args) throws IOException {
        solve();

    }
    static List<String> lyrics = new ArrayList<>();
    private static void solve() throws IOException {
        PrintWriter printWriter = new PrintWriter(System.out);
        InputStreamReader reader = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(reader);

        int wordsCount = Integer.parseInt(br.readLine());

        Map<Integer, List<Word>> wordsMap = new HashMap<>();

        for(int i=0; i<wordsCount;i++){
            Word word = new Word(br.readLine());
            int vowelCount = word.getVowelCount();
            if(!wordsMap.containsKey(vowelCount))
                wordsMap.put(vowelCount,new ArrayList<>());
            wordsMap.get(vowelCount).add(word);
        }

        List<ValidCombo> secondWordsList =  new ArrayList<>();
        List<ValidCombo> firstWordsList = new ArrayList<>();

        wordsMap.keySet().forEach(k->{
            secondWordsList.addAll(findValidSecondWords(wordsMap.get(k)));
            firstWordsList.addAll(findValidFirstWords(wordsMap.get(k)));
        });

        while (secondWordsList.size() > firstWordsList.size() + 1){
            ValidCombo validCombo = secondWordsList.get(0);
            firstWordsList.add(validCombo);
            secondWordsList.remove(validCombo);
        }

        for (int i = 0; i < secondWordsList.size() && i < firstWordsList.size(); i++) {
           constructLyrics(firstWordsList.get(i),secondWordsList.get(i));
        }

        printWriter.println(lyrics.size());
        lyrics.forEach(printWriter::println);

        printWriter.flush();
    }

    private static List<ValidCombo> findValidFirstWords(List<Word> words) {
        List<ValidCombo> combos = new ArrayList<>();
        for (int word = 0; word < words.size(); word++) {
            for (int secondWord = word+1; secondWord < words.size(); secondWord++) {
                Word word1 = words.get(word);
                Word word2 = words.get(secondWord);
                if(word1.getVowelCount() == word2.getVowelCount()){
                    combos.add(new ValidCombo(word1, word2));
                    words.remove(word1);
                    words.remove(word2);
                    word = 0;
                }
            }
        }
        return combos;
    }

    private static List<ValidCombo> findValidSecondWords(List<Word> words) {
        List<ValidCombo> combos = new ArrayList<>();
        for (int word = 0; word < words.size(); word++) {
            for (int secondWord = word+1; secondWord < words.size(); secondWord++) {
                Word word1 = words.get(word);
                Word word2 = words.get(secondWord);
                if(word1.getVowelCount() == word2.getVowelCount()
                        && word1.getEndingVowel() == word2.getEndingVowel()){
                    combos.add(new ValidCombo(word1, word2));
                    words.remove(word1);
                    words.remove(word2);
                    word = 0;
                }
            }
        }
        return combos;
    }

    static void constructLyrics(ValidCombo firstWords, ValidCombo secondWords){
        lyrics.add(firstWords.word1.toString() + " " + secondWords.word1.toString() +
                "\n" + firstWords.word2.toString() + " " + secondWords.word2.toString());
    }

    private static class ValidCombo {
        Word word1;

        Word word2;

        public ValidCombo(Word word1, Word word2){
            this.word1 = word1;
            this.word2 = word2;
        }

        @Override
        public String toString() {
            return word1.toString() + ":" + word2.toString();
        }
    }

    private static class Word{
        private int vowelCount;

        private char endingVowel;
        private String line;

        public Word(String line){
            this.line = line;
            vowelCount = 0;
            for(char c : line.toCharArray()){
                if(c == 'a' || c == 'e' || c == 'o' || c == 'u' || c == 'i'){
                    vowelCount++;
                    endingVowel = c;
                }
            }
        }

        @Override
        public String toString(){
            return line;
        }

        public int getVowelCount() {
            return vowelCount;
        }

        public char getEndingVowel() {
            return endingVowel;
        }

    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class Promlemo2 {
    public static void main(String[] args) throws IOException {
        solve();

    }
    static List<String> lyrics = new ArrayList<>();
    private static void solve() throws IOException {
//        PrintWriter printWriter = new PrintWriter(System.out);
//        InputStreamReader reader = new InputStreamReader(System.in);
//        BufferedReader br = new BufferedReader(reader);
        Scanner scanner = new Scanner(System.in);
        int wordsCount = Integer.parseInt(scanner.nextLine());

        Map<Integer, List<Word>> wordsMap = new HashMap<>();

        for(int i=0; i<wordsCount;i++){
            Word word = new Word(scanner.nextLine());
            int vowelCount = word.getVowelCount();
            if(!wordsMap.containsKey(vowelCount))
                wordsMap.put(vowelCount,new ArrayList<>());
            wordsMap.get(vowelCount).add(word);
        }

        List<ValidCombo> secondWordsList =  new ArrayList<>();
        List<ValidCombo> firstWordsList = new ArrayList<>();

        wordsMap.keySet().forEach(k->{
            secondWordsList.addAll(findValidSecondWords(wordsMap.get(k)));
            firstWordsList.addAll(findValidFirstWords(wordsMap.get(k)));
        });

        while (secondWordsList.size() > firstWordsList.size() + 1){
            ValidCombo validCombo = secondWordsList.get(0);
            firstWordsList.add(validCombo);
            secondWordsList.remove(validCombo);
        }

        for (int i = 0; i < secondWordsList.size() && i < firstWordsList.size(); i++) {
           constructLyrics(firstWordsList.get(i),secondWordsList.get(i));
        }

        System.out.println(lyrics.size());
        lyrics.forEach(System.out::println);

    }

    private static List<ValidCombo> findValidFirstWords(List<Word> words) {
        List<ValidCombo> combos = new ArrayList<>();
        for (int word = 0; word+1 < words.size(); word++) {
            Word word1 = words.get(word);
            Word word2 = words.get(++word);
            combos.add(new ValidCombo(word1, word2));
        }
        return combos;
    }

    private static List<ValidCombo> findValidSecondWords(List<Word> words) {
        List<ValidCombo> combos = new ArrayList<>();
        for (int word = 0; word < words.size(); word++) {
            for (int secondWord = word+1; secondWord < words.size(); secondWord++) {
                Word word1 = words.get(word);
                Word word2 = words.get(secondWord);
                if(word1.getEndingVowel() == word2.getEndingVowel()){
                    combos.add(new ValidCombo(word1, word2));
                    words.remove(word1);
                    words.remove(word2);
                    word--;
                    break;
                }
            }
        }
        return combos;
    }

    static void constructLyrics(ValidCombo firstWords, ValidCombo secondWords){
        lyrics.add(firstWords.word1.toString() + " " + secondWords.word1.toString() +
                "\n" + firstWords.word2.toString() + " " + secondWords.word2.toString());
    }

    private static class ValidCombo {
        Word word1;

        Word word2;

        public ValidCombo(Word word1, Word word2){
            this.word1 = word1;
            this.word2 = word2;
        }

        @Override
        public String toString() {
            return word1.toString() + ":" + word2.toString();
        }
    }

    private static class Word{
        private int vowelCount;

        private char endingVowel;
        private String line;

        public Word(String line){
            this.line = line;
            vowelCount = 0;
            for(char c : line.toCharArray()){
                if(c == 'a' || c == 'e' || c == 'o' || c == 'u' || c == 'i'){
                    vowelCount++;
                    endingVowel = c;
                }
            }
        }

        @Override
        public String toString(){
            return line;
        }

        public int getVowelCount() {
            return vowelCount;
        }

        public char getEndingVowel() {
            return endingVowel;
        }

    }

}


import java.io.*;
import java.util.*;

import static java.lang.Math.*;

public class Main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");
    PrintWriter pw = new PrintWriter(System.out);

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    String next() throws IOException {
        if (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    public static void main(String[] args) throws IOException {
        new Main().run();
    }

    void run() throws IOException {
        int n = nextInt();
        int sameone = 0;
        int sametwo = 0;
        String[] s = new String[n];
        int maxsize = 0;
        for (int i = 0; i < s.length; i++) {
            s[i] = next();
            maxsize = max(maxsize, s[i].length());
        }
        HashMap<Character, Stack<Integer>>[] x = new HashMap[maxsize + 1];
        boolean[] used = new boolean[n];
        Stack<Integer> e[] = new Stack[maxsize + 1];
        for (int i = 0; i < e.length; i++) {
            e[i] = new Stack<>();
        }
        for (int i = 0; i < x.length; i++) {
            x[i] = new HashMap<>();
        }
        Stack<Pair> st = new Stack<>();
        for (int i = 0; i < s.length; i++) {
            char[] a = s[i].toCharArray();
            int count = 0;
            char last = '-';
            for (int j = 0; j < a.length; j++) {
                if (a[j] == 'a' || a[j] == 'e' || a[j] == 'o' || a[j] == 'i' || a[j] == 'u') {
                    count++;
                    last = a[j];
                }
            }
            if (last != '-') {
                if (x[count].containsKey(last)) {
                    int w = x[count].get(last).pop();
                    st.add(new Pair(s[i], s[w]));
                    used[i] = true;
                    used[w] = true;
                    if (x[count].get(last).size() == 0) x[count].remove(last);
                } else {
                    x[count].put(last, new Stack<>());
                    x[count].get(last).add(i);
                }
            }
        }
        sametwo += st.size();
        Stack<Pair> r = new Stack<>();
        for (int i = 0; i < s.length; i++) {
            if (used[i]) continue;
            int count = 0;
            char[] a = s[i].toCharArray();
            for (int j = 0; j < a.length; j++) {
                if (a[j] == 'a' || a[j] == 'e' || a[j] == 'o' || a[j] == 'i' || a[j] == 'u') {
                    count++;
                }
            }
            if (e[count].isEmpty()) {
                e[count].add(i);
            } else r.add(new Pair(s[i], s[e[count].pop()]));
        }
        sameone += r.size();
        if (sameone > sametwo) {
            pw.println(sametwo);
            while (!st.isEmpty()) {
                Pair a = r.pop();
                Pair b = st.pop();
                pw.println(a.x + " " + b.x);
                pw.println(a.y + " " + b.y);
            }
        } else {
            pw.println((sameone + (sametwo - sameone) / 2));
            while (!r.isEmpty()) {
                Pair a = r.pop();
                Pair b = st.pop();
                pw.println(a.x + " " + b.x);
                pw.println(a.y + " " + b.y);
            }
            while (st.size() > 1) {
                Pair a = st.pop();
                Pair b = st.pop();
                pw.println(a.x + " " + b.x);
                pw.println(a.y + " " + b.y);
            }
        }
        pw.close();
    }

    class Pair {
        String x, y;

        public Pair(String a, String b) {
            x = a;
            y = b;
        }
    }
}


import java.io.*;
import java.util.*;

import static java.lang.Math.*;

public class Main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");
    PrintWriter pw = new PrintWriter(System.out);

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    String next() throws IOException {
        if (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    public static void main(String[] args) throws IOException {
        new Main().run();
    }

    void run() throws IOException {
        int n = nextInt();
        int sameone = 0;
        int sametwo = 0;
        String[] s = new String[n];
        int maxsize = 0;
        for (int i = 0; i < s.length; i++) {
            s[i] = next();
            maxsize = max(maxsize, s[i].length());
        }
        HashMap<Character, Stack<Integer>>[] x = new HashMap[maxsize + 1];
        boolean[] used = new boolean[n];
        Stack<Integer> e[] = new Stack[maxsize + 1];
        for (int i = 0; i < e.length; i++) {
            e[i] = new Stack<>();
        }
        for (int i = 0; i < x.length; i++) {
            x[i] = new HashMap<>();
        }
        Stack<Pair> st = new Stack<>();
        for (int i = 0; i < s.length; i++) {
            char[] a = s[i].toCharArray();
            int count = 0;
            char last = '-';
            for (int j = 0; j < a.length; j++) {
                if (a[j] == 'a' || a[j] == 'e' || a[j] == 'o' || a[j] == 'i' || a[j] == 'u') {
                    count++;
                    last = a[j];
                }
            }
            if (last != '-') {
                if (x[count].containsKey(last)) {
                    int w = x[count].get(last).pop();
                    st.add(new Pair(s[i], s[w]));
                    used[i] = true;
                    used[w] = true;
                    if (x[count].get(last).size() == 0) x[count].remove(last);
                } else {
                    x[count].put(last, new Stack<>());
                    x[count].get(last).add(i);
                }
            }
        }
        sametwo += st.size();
        Stack<Pair> r = new Stack<>();
        for (int i = 0; i < s.length; i++) {
            if (used[i]) continue;
            int count = 0;
            char[] a = s[i].toCharArray();
            for (int j = 0; j < a.length; j++) {
                if (a[j] == 'a' || a[j] == 'e' || a[j] == 'o' || a[j] == 'i' || a[j] == 'u') {
                    count++;
                }
            }
            if (e[count].isEmpty()) {
                e[count].add(i);
            } else r.add(new Pair(s[i], s[e[count].pop()]));
        }
        sameone += r.size();
        if (sameone > sametwo) {
            pw.println(sametwo);
            while (!st.isEmpty()) {
                Pair a = st.pop();
                Pair b = r.pop();
                pw.println(a.x + " " + b.x);
                pw.println(a.y + " " + b.y);
            }
        } else {
            pw.println((sameone + (sametwo - sameone) / 2));
            while (!r.isEmpty()) {
                Pair a = st.pop();
                Pair b = r.pop();
                pw.println(a.x + " " + b.x);
                pw.println(a.y + " " + b.y);
            }
            while (st.size() > 1) {
                Pair a = st.pop();
                Pair b = st.pop();
                pw.println(a.x + " " + b.x);
                pw.println(a.y + " " + b.y);
            }
        }
        pw.close();
    }

    class Pair {
        String x, y;

        public Pair(String a, String b) {
            x = a;
            y = b;
        }
    }
}


import java.io.*;
import java.util.*;

import static java.lang.Math.*;

public class Main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");
    PrintWriter pw = new PrintWriter(System.out);

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    String next() throws IOException {
        if (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    public static void main(String[] args) throws IOException {
        new Main().run();
    }

    void run() throws IOException {
        int n = nextInt();
        int sameone = 0;
        int sametwo = 0;
        String[] s = new String[n];
        int maxsize = 0;
        for (int i = 0; i < s.length; i++) {
            s[i] = next();
            maxsize = max(maxsize, s[i].length());
        }
        HashMap<Character, Stack<Integer>>[] x = new HashMap[maxsize + 1];
        boolean[] used = new boolean[maxsize + 1];
        Stack<Integer> e[] = new Stack[maxsize + 1];
        for (int i = 0; i < e.length; i++) {
            e[i] = new Stack<>();
        }
        for (int i = 0; i < x.length; i++) {
            x[i] = new HashMap<>();
        }
        Stack<Pair> st = new Stack<>();
        for (int i = 0; i < s.length; i++) {
            char[] a = s[i].toCharArray();
            int count = 0;
            char last = '-';
            for (int j = 0; j < a.length; j++) {
                if (a[j] == 'a' || a[j] == 'e' || a[j] == 'o' || a[j] == 'i' || a[j] == 'u') {
                    count++;
                    last = a[j];
                }
            }
            if (last != '-') {
                if (x[count].containsKey(last)) {
                    int w = x[count].get(last).pop();
                    st.add(new Pair(s[i], s[w]));
                    used[i] = true;
                    used[w] = true;
                    if (x[count].get(last).size() == 0) x[count].remove(last);
                } else {
                    x[count].put(last, new Stack<>());
                    x[count].get(last).add(i);
                }
            }
        }
        sametwo += st.size();
        Stack<Pair> r = new Stack<>();
        for (int i = 0; i < s.length; i++) {
            if (used[i]) continue;
            int count = 0;
            char[] a = s[i].toCharArray();
            for (int j = 0; j < a.length; j++) {
                if (a[j] == 'a' || a[j] == 'e' || a[j] == 'o' || a[j] == 'i' || a[j] == 'u') {
                    count++;
                }
            }
            if (e[count].isEmpty()) {
                e[count].add(i);
            } else r.add(new Pair(s[i], s[e[count].pop()]));
        }
        sameone += r.size();
        if (sameone > sametwo) {
            pw.println(sametwo);
            while (!st.isEmpty()) {
                Pair a = st.pop();
                Pair b = r.pop();
                pw.println(a.x + " " + b.x);
                pw.println(a.y + " " + b.y);
            }
        } else {
            pw.println((sameone + (sametwo - sameone) / 2));
            while (!r.isEmpty()) {
                Pair a = st.pop();
                Pair b = r.pop();
                pw.println(a.x + " " + b.x);
                pw.println(a.y + " " + b.y);
            }
            while (st.size() > 1) {
                Pair a = st.pop();
                Pair b = st.pop();
                pw.println(a.x + " " + b.x);
                pw.println(a.y + " " + b.y);
            }
        }
        pw.close();
    }

    class Pair {
        String x, y;

        public Pair(String a, String b) {
            x = a;
            y = b;
        }
    }
}


import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Main {

	static class Word {
		String w;
		int gl;
		char lastgl;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.nextLine();
		Word[] words = new Word[n];
		for (int i = 0; i < n; i++) {
			words[i] = new Word();
			words[i].w = sc.nextLine();
			words[i].gl = 0;
			for (int j = 0; j < words[i].w.length(); j++) {
				switch (words[i].w.charAt(j)) {
					case 'a':
						words[i].gl++;
						words[i].lastgl = 'a';
						break;
					case 'e':
						words[i].gl++;
						words[i].lastgl = 'e';
						break;
					case 'o':
						words[i].gl++;
						words[i].lastgl = 'o';
						break;
					case 'i':
						words[i].gl++;
						words[i].lastgl = 'i';
						break;
					case 'u':
						words[i].gl++;
						words[i].lastgl = 'u';
						break;
				}
			}
		}
		Arrays.sort(words, new Comparator<Word>() {

			@Override
			public int compare(Word o1, Word o2) {
				return (o1.gl - o2.gl) * 40 + o1.lastgl - o2.lastgl;
			}
		});
		ArrayList<Integer> aend = new ArrayList<Integer>();
		ArrayList<Integer> abegin = new ArrayList<Integer>();
		for (int i = 0; i < n - 1; i++) {
			if (words[i].gl == words[i + 1].gl) {
				if (words[i].lastgl == words[i + 1].lastgl) {
					aend.add(i);
				} else {
					abegin.add(i);
				}
				i++;
			}
		}
		if (aend.size() <= abegin.size()) {
			System.out.println(aend.size());
			for (int i = 0; i < aend.size(); i++) {
				System.out.println(words[abegin.get(i)].w + " " + words[aend.get(i)].w);
				System.out.println(words[abegin.get(i) + 1].w + " " + words[aend.get(i) + 1].w);
			}
		} else {
			while (aend.size() > abegin.size()) {
				abegin.add(aend.remove(0));
			}
			System.out.println(aend.size());
			for (int i = 0; i < aend.size(); i++) {
				System.out.println(words[abegin.get(i)].w + " " + words[aend.get(i)].w);
				System.out.println(words[abegin.get(i) + 1].w + " " + words[aend.get(i) + 1].w);
			}
		}
	}

}


import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Main {

	static class Word {
		String w;
		int gl;
		char lastgl;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.nextLine();
		Word[] words = new Word[n];
		for (int i = 0; i < n; i++) {
			words[i] = new Word();
			words[i].w = sc.nextLine();
			char[] chrs = words[i].w.toCharArray();
			words[i].gl = 0;
			for (int j = 0; j < chrs.length; j++) {
				switch (chrs[j]) {
					case 'a':
						words[i].gl++;
						words[i].lastgl = 'a';
						break;
					case 'e':
						words[i].gl++;
						words[i].lastgl = 'e';
						break;
					case 'o':
						words[i].gl++;
						words[i].lastgl = 'o';
						break;
					case 'i':
						words[i].gl++;
						words[i].lastgl = 'i';
						break;
					case 'u':
						words[i].gl++;
						words[i].lastgl = 'u';
						break;
				}
			}
		}
		Arrays.sort(words, new Comparator<Word>() {

			@Override
			public int compare(Word o1, Word o2) {
				return (o1.gl - o2.gl) * 40 + o1.lastgl - o2.lastgl;
			}
		});
		ArrayList<Integer> aend = new ArrayList<Integer>();
		ArrayList<Integer> abegin1 = new ArrayList<Integer>();
		ArrayList<Integer> abegin2 = new ArrayList<Integer>();
		int lastcount = -1;
		int last = 0;
		for (int i = 0; i < n - 1; i++) {
			if (words[i].gl == words[i + 1].gl) {
				if (words[i].lastgl == words[i + 1].lastgl) {
					aend.add(i);
					i++;
				} else if (lastcount != words[i].gl) {
					lastcount = words[i].gl;
					last = i;
				} else {
					abegin1.add(last);
					abegin2.add(i);
					lastcount = -1;
				}
			} else if (lastcount != -1) {
				if (words[last].gl == words[i].gl) {
					abegin1.add(last);
					abegin2.add(i);
				}
				lastcount = -1;
			}
		}
		if (aend.size() > 0) {
			if (aend.get(aend.size() - 1) != n - 2) {
				if (lastcount  == words[n - 1].gl) {
					abegin1.add(last);
					abegin2.add(n - 1);
				}
			}
		}
		if (aend.size() <= abegin1.size()) {
			System.out.println(aend.size());
			for (int i = 0; i < aend.size(); i++) {
				System.out.println(words[abegin1.get(i)].w + " " + words[aend.get(i)].w);
				System.out.println(words[abegin2.get(i)].w + " " + words[aend.get(i) + 1].w);
			}
		} else {
			while (aend.size() > abegin1.size()) {
				Integer x = aend.remove(0);
				abegin1.add(x);
				abegin2.add(x + 1);
			}
			System.out.println(aend.size());
			for (int i = 0; i < aend.size(); i++) {
				System.out.println(words[abegin1.get(i)].w + " " + words[aend.get(i)].w);
				System.out.println(words[abegin2.get(i)].w + " " + words[aend.get(i) + 1].w);
			}
		}
	}

}


import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Main {

	static class Word {
		String w;
		int gl;
		char lastgl;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.nextLine();
		Word[] words = new Word[n];
		for (int i = 0; i < n; i++) {
			words[i] = new Word();
			words[i].w = sc.nextLine();
			char[] chrs = words[i].w.toCharArray();
			words[i].gl = 0;
			for (int j = 0; j < chrs.length; j++) {
				switch (chrs[j]) {
					case 'a':
						words[i].gl++;
						words[i].lastgl = 'a';
						break;
					case 'e':
						words[i].gl++;
						words[i].lastgl = 'e';
						break;
					case 'o':
						words[i].gl++;
						words[i].lastgl = 'o';
						break;
					case 'i':
						words[i].gl++;
						words[i].lastgl = 'i';
						break;
					case 'u':
						words[i].gl++;
						words[i].lastgl = 'u';
						break;
				}
			}
		}
		Arrays.sort(words, new Comparator<Word>() {

			@Override
			public int compare(Word o1, Word o2) {
				return (o1.gl - o2.gl) * 40 + o1.lastgl - o2.lastgl;
			}
		});
		ArrayList<Integer> aend = new ArrayList<Integer>();
		ArrayList<Integer> abegin1 = new ArrayList<Integer>();
		ArrayList<Integer> abegin2 = new ArrayList<Integer>();
		int lastcount = -1;
		int last = 0;
		for (int i = 0; i < n - 1; i++) {
			if (words[i].gl == words[i + 1].gl) {
				if (words[i].lastgl == words[i + 1].lastgl) {
					aend.add(i);
					i++;
				} else if (lastcount != words[i].gl) {
					lastcount = words[i].gl;
					last = i;
				} else {
					abegin1.add(last);
					abegin2.add(i);
					lastcount = -1;
				}
			} else if (lastcount != -1) {
				if (words[last].gl == words[i].gl) {
					abegin1.add(last);
					abegin2.add(i);
				}
				lastcount = -1;
			}
		}
		if (aend.get(aend.size() - 1) != n - 2) {
			if (lastcount  == words[n - 1].gl) {
				abegin1.add(last);
				abegin2.add(n - 1);
			}
		}
		if (aend.size() <= abegin1.size()) {
			System.out.println(aend.size());
			for (int i = 0; i < aend.size(); i++) {
				System.out.println(words[abegin1.get(i)].w + " " + words[aend.get(i)].w);
				System.out.println(words[abegin2.get(i)].w + " " + words[aend.get(i) + 1].w);
			}
		} else {
			while (aend.size() > abegin1.size()) {
				Integer x = aend.remove(0);
				abegin1.add(x);
				abegin2.add(x + 1);
			}
			System.out.println(aend.size());
			for (int i = 0; i < aend.size(); i++) {
				System.out.println(words[abegin1.get(i)].w + " " + words[aend.get(i)].w);
				System.out.println(words[abegin2.get(i)].w + " " + words[aend.get(i) + 1].w);
			}
		}
	}

}


import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Main {

	static class Word {
		String w;
		int gl;
		char lastgl;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.nextLine();
		Word[] words = new Word[n];
		for (int i = 0; i < n; i++) {
			words[i] = new Word();
			words[i].w = sc.nextLine();
			char[] chrs = words[i].w.toCharArray();
			words[i].gl = 0;
			for (int j = 0; j < chrs.length; j++) {
				switch (chrs[j]) {
					case 'a':
						words[i].gl++;
						words[i].lastgl = 'a';
						break;
					case 'e':
						words[i].gl++;
						words[i].lastgl = 'e';
						break;
					case 'o':
						words[i].gl++;
						words[i].lastgl = 'o';
						break;
					case 'i':
						words[i].gl++;
						words[i].lastgl = 'i';
						break;
					case 'u':
						words[i].gl++;
						words[i].lastgl = 'u';
						break;
				}
			}
		}
		Arrays.sort(words, new Comparator<Word>() {

			@Override
			public int compare(Word o1, Word o2) {
				return (o1.gl - o2.gl) * 40 + o1.lastgl - o2.lastgl;
			}
		});
		ArrayList<Integer> aend = new ArrayList<Integer>();
		ArrayList<Integer> abegin1 = new ArrayList<Integer>();
		ArrayList<Integer> abegin2 = new ArrayList<Integer>();
		int lastcount = -1;
		int last = 0;
		for (int i = 0; i < n - 1; i++) {
			if (words[i].gl == words[i + 1].gl) {
				if (words[i].lastgl == words[i + 1].lastgl) {
					aend.add(i);
					i++;
				} else if (lastcount != words[i].gl) {
					lastcount = words[i].gl;
					last = i;
				} else {
					abegin1.add(last);
					abegin2.add(i);
					lastcount = -1;
				}
			} else if (lastcount != -1) {
				if (words[last].gl == words[i].gl) {
					abegin1.add(last);
					abegin2.add(i);
				}
				lastcount = -1;
			}
		}
		if (aend.size() <= abegin1.size()) {
			System.out.println(aend.size());
			for (int i = 0; i < aend.size(); i++) {
				System.out.println(words[abegin1.get(i)].w + " " + words[aend.get(i)].w);
				System.out.println(words[abegin2.get(i)].w + " " + words[aend.get(i) + 1].w);
			}
		} else {
			while (aend.size() > abegin1.size()) {
				Integer x = aend.remove(0);
				abegin1.add(x);
				abegin2.add(x + 1);
			}
			System.out.println(aend.size());
			for (int i = 0; i < aend.size(); i++) {
				System.out.println(words[abegin1.get(i)].w + " " + words[aend.get(i)].w);
				System.out.println(words[abegin2.get(i)].w + " " + words[aend.get(i) + 1].w);
			}
		}
	}

}


import java.io.*;
import java.util.*;

public class Main_Round566Div2_C1 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int n = sc.nextInt();

		char[] va = {'a', 'e', 'i', 'o', 'u'};

		String[] s = new String[n];
		Pair[] sss = new Pair[n];
		for (int i = 0; i < n; i++) {
			s[i] = sc.next();

			char lc = 0;
			int cnt = 0;
			for (int j = s[i].length() - 1; j >= 0; j--) {
				for (int k = 0; k < 5; k++) {
					if (s[i].charAt(j) == va[k]) {
						if (lc == 0) {
							lc = va[k];
						}
						cnt++;
						break;
					}
				}
			}

			sss[i] = new Pair(lc, cnt, i);
		}
		Arrays.sort(sss);

		List<Pair> l1 = new ArrayList<>();
		List<Pair> l2 = new ArrayList<>();
		for (int i = 0; i < n; ) {
			if (i < n - 1 && sss[i].c == sss[i + 1].c && sss[i].a == sss[i + 1].a) {
				l2.add(sss[i]);
				l2.add(sss[i + 1]);
				i += 2;
			} else {
				l1.add(sss[i]);
				i++;
			}
		}
		Collections.sort(l1, (o1, o2) -> {
			return o1.a == o2.a ? Integer.compare(o1.b, o2.b) : Integer.compare(o1.a, o2.a);
		});

		List<Pair> l11 = new ArrayList<>();
		for (int i = 0, size = l1.size(); i < size; ) {
			if (i < size - 1 && l1.get(i).a == l1.get(i + 1).a) {
				l11.add(l1.get(i));
				l11.add(l1.get(i + 1));
				i += 2;
			} else {
				i++;
			}
		}

		int m = Math.min(l2.size(), l11.size()) / 2;
		m += (l2.size() - m * 2) / 4;
		pr.println(m);
		int i;
		for (i = 0; i < Math.min(l2.size(), l11.size()); i += 2) {
			pr.printStrings(s[l11.get(i).b], s[l2.get(i).b]);
			pr.printStrings(s[l11.get(i + 1).b], s[l2.get(i + 1).b]);
		}

		for (int size = l2.size(); i < size; i += 4) {
			if (i + 3 < size) {
				pr.printStrings(s[l2.get(i + 2).b], s[l2.get(i).b]);
				pr.printStrings(s[l2.get(i + 3).b], s[l2.get(i + 1).b]);
			}
		}

	}

	static class Pair implements Comparable<Pair> {
		int a;
		int b;
		char c;

		Pair(char c, int a, int b) {
			this.a = a;
			this.b = b;
			this.c = c;
		}

		@Override
		public int compareTo(Pair o) {
			if (c == o.c) {
				if (a == o.a) {
					return Integer.compare(b, o.b);
				}

				return Integer.compare(a, o.a);
			}

			return Character.compare(c, o.c);
		}

		@Override
		public int hashCode() {
			return Character.hashCode(c) + Integer.hashCode(a) + Integer.hashCode(b);
		}

		@Override
		public boolean equals(Object obj) {
			Pair o = (Pair) obj;
			return c == o.c && a == o.a && b == o.b;
		}

		@Override
		public String toString() {
			// [xxx, xxxx]
			StringBuilder stmp = new StringBuilder(32);
			stmp.append('[');
			stmp.append(a);
			stmp.append(',');
			stmp.append(' ');
			stmp.append(b);
			stmp.append(']');

			return stmp.toString();
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);

		solve();

		pr.close();
		sc.close();
	}

	static class Scanner {
		BufferedReader br;

		Scanner (InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
		}

		private boolean isPrintable(int ch) {
			return ch >= '!' && ch <= '~';
		}

		private boolean isCRLF(int ch) {
			return ch == '\n' || ch == '\r' || ch == -1;
		}

		private int nextPrintable() {
			try {
				int ch;
				while (!isPrintable(ch = br.read())) {
					if (ch == -1) {
						throw new NoSuchElementException();
					}
				}

				return ch;
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		String next() {
			try {
				int ch = nextPrintable();
				StringBuilder sb = new StringBuilder();
				do {
					sb.appendCodePoint(ch);
				} while (isPrintable(ch = br.read()));

				return sb.toString();
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		int nextInt() {
			try {
				// parseInt from Integer.parseInt()
				boolean negative = false;
				int res = 0;
				int limit = -Integer.MAX_VALUE;
				int radix = 10;

				int fc = nextPrintable();
				if (fc < '0') {
					if (fc == '-') {
						negative = true;
						limit = Integer.MIN_VALUE;
					} else if (fc != '+') {
						throw new NumberFormatException();
					}
					fc = br.read();
				}
				int multmin = limit / radix;

				int ch = fc;
				do {
					int digit = ch - '0';
					if (digit < 0 || digit >= radix) {
						throw new NumberFormatException();
					}
					if (res < multmin) {
						throw new NumberFormatException();
					}
					res *= radix;
					if (res < limit + digit) {
						throw new NumberFormatException();
					}
					res -= digit;

				} while (isPrintable(ch = br.read()));

				return negative ? res : -res;
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		long nextLong() {
			try {
				// parseLong from Long.parseLong()
				boolean negative = false;
				long res = 0;
				long limit = -Long.MAX_VALUE;
				int radix = 10;

				int fc = nextPrintable();
				if (fc < '0') {
					if (fc == '-') {
						negative = true;
						limit = Long.MIN_VALUE;
					} else if (fc != '+') {
						throw new NumberFormatException();
					}
					fc = br.read();
				}
				long multmin = limit / radix;

				int ch = fc;
				do {
					int digit = ch - '0';
					if (digit < 0 || digit >= radix) {
						throw new NumberFormatException();
					}
					if (res < multmin) {
						throw new NumberFormatException();
					}
					res *= radix;
					if (res < limit + digit) {
						throw new NumberFormatException();
					}
					res -= digit;

				} while (isPrintable(ch = br.read()));

				return negative ? res : -res;
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		float nextFloat() {
			return Float.parseFloat(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			try {
				int ch;
				while (isCRLF(ch = br.read())) {
					if (ch == -1) {
						throw new NoSuchElementException();
					}
				}
				StringBuilder sb = new StringBuilder();
				do {
					sb.appendCodePoint(ch);
				} while (!isCRLF(ch = br.read()));

				return sb.toString();
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		int[] nextIntArray(int n) {
			int[] ret = new int[n];
			for (int i = 0; i < n; i++) {
				ret[i] = sc.nextInt();
			}

			return ret;
		}

		int[][] nextIntArrays(int n, int m) {
			int[][] ret = new int[m][n];
			for (int i = 0; i < n; i++) {
				for (int j = 0; j < m; j++) {
					ret[j][i] = sc.nextInt();
				}
			}

			return ret;
		}

		void close() {
			try {
				br.close();
			} catch (IOException e) {
//				throw new NoSuchElementException();
			}
		}
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}

		void printInts(int... a) {
			StringBuilder sb = new StringBuilder(32);
			for (int i = 0, size = a.length; i < size; i++) {
				if (i > 0) {
					sb.append(' ');
				}
				sb.append(a[i]);
			}

			println(sb);
		}

		void printLongs(long... a) {
			StringBuilder sb = new StringBuilder(64);
			for (int i = 0, size = a.length; i < size; i++) {
				if (i > 0) {
					sb.append(' ');
				}
				sb.append(a[i]);
			}

			println(sb);
		}

		void printStrings(String... a) {
			StringBuilder sb = new StringBuilder(32);
			for (int i = 0, size = a.length; i < size; i++) {
				if (i > 0) {
					sb.append(' ');
				}
				sb.append(a[i]);
			}

			println(sb);
		}
	}
}


import java.io.*;
import java.util.*;

public class Main_Round566Div2_C {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int n = sc.nextInt();

		char[] va = {'a', 'e', 'i', 'o', 'u'};

		String[] s = new String[n];
		StringBuilder[] ss = new StringBuilder[n];
		Pair[] sss = new Pair[n];
		for (int i = 0; i < n; i++) {
			s[i] = sc.next();

			StringBuilder sb = new StringBuilder();
			for (int j = s[i].length() - 1; j >= 0; j--) {
				for (int k = 0; k < 5; k++) {
					if (s[i].charAt(j) == va[k]) {
						if (sb.length() == 0) {
							sb.append(va[k]);
						} else {
							sb.append('?');
						}
						break;
					}
				}
			}

			ss[i] = sb;
			sss[i] = new Pair(ss[i].toString(), i);
		}
		Arrays.sort(sss);

//		pr.println(Arrays.toString(ss));
		List<Pair> l1 = new ArrayList<>();
		List<Integer> l2 = new ArrayList<>();
		for (int i = 0; i < n; ) {
			if (i < n - 1 && sss[i].a.equals(sss[i + 1].a)) {
				l2.add(sss[i].b);
				l2.add(sss[i + 1].b);
				i += 2;
			} else {
				StringBuilder sb = new StringBuilder(sss[i].a);
				sb.setCharAt(0, '?');
				sss[i].a = sb.toString();
				l1.add(sss[i]);
				i++;
			}
		}
		Collections.sort(l1);
		List<Integer> l11 = new ArrayList<>();
		for (int i = 0, size = l1.size(); i < size; ) {
			if (i < size - 1 && l1.get(i).a.equals(l1.get(i + 1).a)) {
				l11.add(l1.get(i).b);
				l11.add(l1.get(i + 1).b);
				i += 2;
			} else {
				i++;
			}
		}

		int m = Math.min(l2.size(), l11.size()) / 2;
		m += (l2.size() - m * 2) / 4;
		pr.println(m);
		int i;
		for (i = 0; i < Math.min(l2.size(), l11.size()); i += 2) {
			StringBuilder sb = new StringBuilder();
			sb.append(s[l11.get(i)]);
			sb.append(' ');
			sb.append(s[l2.get(i)]);
			pr.println(sb);
			sb = new StringBuilder();
			sb.append(s[l11.get(i + 1)]);
			sb.append(' ');
			sb.append(s[l2.get(i + 1)]);
			pr.println(sb);
		}

		for (int size = l2.size(); i < size; i += 4) {
			if (i + 3 < size) {
				StringBuilder sb = new StringBuilder();
				sb.append(s[l2.get(i + 2)]);
				sb.append(' ');
				sb.append(s[l2.get(i + 0)]);
				pr.println(sb);
				sb = new StringBuilder();
				sb.append(s[l2.get(i + 3)]);
				sb.append(' ');
				sb.append(s[l2.get(i + 1)]);
				pr.println(sb);

			}
		}

	}

	static class Pair implements Comparable<Pair> {
		String a;
		int b;

		Pair(String ss, int b) {
			this.a = ss;
			this.b = b;
		}

		@Override
		public int compareTo(Pair o) {
			if (a.equals(o.a)) {
				return Integer.compare(b, o.b);
			}

			return a.compareTo(o.a);
		}

		@Override
		public int hashCode() {
			return a.hashCode() + Integer.hashCode(b);
		}

		@Override
		public boolean equals(Object obj) {
			Pair o = (Pair) obj;
			return a.equals(o.a) && b == o.b;
		}

		@Override
		public String toString() {
			// [xxx, xxxx]
			StringBuilder stmp = new StringBuilder(32);
			stmp.append('[');
			stmp.append(a);
			stmp.append(',');
			stmp.append(' ');
			stmp.append(b);
			stmp.append(']');

			return stmp.toString();
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);

		solve();

		pr.close();
		sc.close();
	}

	static class Scanner {
		BufferedReader br;

		Scanner (InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
		}

		private boolean isPrintable(int ch) {
			return ch >= '!' && ch <= '~';
		}

		private boolean isCRLF(int ch) {
			return ch == '\n' || ch == '\r' || ch == -1;
		}

		private int nextPrintable() {
			try {
				int ch;
				while (!isPrintable(ch = br.read())) {
					if (ch == -1) {
						throw new NoSuchElementException();
					}
				}

				return ch;
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		String next() {
			try {
				int ch = nextPrintable();
				StringBuilder sb = new StringBuilder();
				do {
					sb.appendCodePoint(ch);
				} while (isPrintable(ch = br.read()));

				return sb.toString();
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		int nextInt() {
			try {
				// parseInt from Integer.parseInt()
				boolean negative = false;
				int res = 0;
				int limit = -Integer.MAX_VALUE;
				int radix = 10;

				int fc = nextPrintable();
				if (fc < '0') {
					if (fc == '-') {
						negative = true;
						limit = Integer.MIN_VALUE;
					} else if (fc != '+') {
						throw new NumberFormatException();
					}
					fc = br.read();
				}
				int multmin = limit / radix;

				int ch = fc;
				do {
					int digit = ch - '0';
					if (digit < 0 || digit >= radix) {
						throw new NumberFormatException();
					}
					if (res < multmin) {
						throw new NumberFormatException();
					}
					res *= radix;
					if (res < limit + digit) {
						throw new NumberFormatException();
					}
					res -= digit;

				} while (isPrintable(ch = br.read()));

				return negative ? res : -res;
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		long nextLong() {
			try {
				// parseLong from Long.parseLong()
				boolean negative = false;
				long res = 0;
				long limit = -Long.MAX_VALUE;
				int radix = 10;

				int fc = nextPrintable();
				if (fc < '0') {
					if (fc == '-') {
						negative = true;
						limit = Long.MIN_VALUE;
					} else if (fc != '+') {
						throw new NumberFormatException();
					}
					fc = br.read();
				}
				long multmin = limit / radix;

				int ch = fc;
				do {
					int digit = ch - '0';
					if (digit < 0 || digit >= radix) {
						throw new NumberFormatException();
					}
					if (res < multmin) {
						throw new NumberFormatException();
					}
					res *= radix;
					if (res < limit + digit) {
						throw new NumberFormatException();
					}
					res -= digit;

				} while (isPrintable(ch = br.read()));

				return negative ? res : -res;
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		float nextFloat() {
			return Float.parseFloat(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			try {
				int ch;
				while (isCRLF(ch = br.read())) {
					if (ch == -1) {
						throw new NoSuchElementException();
					}
				}
				StringBuilder sb = new StringBuilder();
				do {
					sb.appendCodePoint(ch);
				} while (!isCRLF(ch = br.read()));

				return sb.toString();
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		int[] nextIntArray(int n) {
			int[] ret = new int[n];
			for (int i = 0; i < n; i++) {
				ret[i] = sc.nextInt();
			}

			return ret;
		}

		int[][] nextIntArrays(int n, int m) {
			int[][] ret = new int[m][n];
			for (int i = 0; i < n; i++) {
				for (int j = 0; j < m; j++) {
					ret[j][i] = sc.nextInt();
				}
			}

			return ret;
		}

		void close() {
			try {
				br.close();
			} catch (IOException e) {
//				throw new NoSuchElementException();
			}
		}
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}


import java.io.*;
import java.util.*;

public class Main_Round566Div2_C {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int n = sc.nextInt();

		char[] va = {'a', 'e', 'i', 'o', 'u'};

		String[] s = new String[n];
		StringBuilder[] ss = new StringBuilder[n];
		Pair[] sss = new Pair[n];
		for (int i = 0; i < n; i++) {
			s[i] = sc.next();

			StringBuilder sb = new StringBuilder();
			for (int j = s[i].length() - 1; j >= 0; j--) {
				for (int k = 0; k < 5; k++) {
					if (s[i].charAt(j) == va[k]) {
						if (sb.length() == 0) {
							sb.append(va[k]);
						} else {
							sb.append('?');
						}
						break;
					}
				}
			}

			ss[i] = sb;
			sss[i] = new Pair(ss[i], i);
		}
		Arrays.sort(sss);

//		pr.println(Arrays.toString(ss));
		List<Pair> l1 = new ArrayList<>();
		List<Integer> l2 = new ArrayList<>();
		for (int i = 0; i < n; ) {
			if (i < n - 1 && sss[i].a.equals(sss[i + 1].a)) {
				l2.add(sss[i].b);
				l2.add(sss[i + 1].b);
				i += 2;
			} else {
				StringBuilder sb = new StringBuilder(sss[i].a);
				sb.setCharAt(0, '?');
				sss[i].a = sb.toString();
				l1.add(sss[i]);
				i++;
			}
		}
		Collections.sort(l1);
		List<Integer> l11 = new ArrayList<>();
		for (int i = 0, size = l1.size(); i < size; ) {
			if (i < size - 1 && l1.get(i).a.equals(l1.get(i + 1).a)) {
				l11.add(l1.get(i).b);
				l11.add(l1.get(i + 1).b);
				i += 2;
			} else {
				i++;
			}
		}

		int m = Math.min(l2.size(), l11.size()) / 2;
		m += (l2.size() - m) / 4;
		pr.println(m);
		int i;
		for (i = 0; i < Math.min(l2.size(), l11.size()); i += 2) {
			StringBuilder sb = new StringBuilder();
			sb.append(s[l11.get(i)]);
			sb.append(' ');
			sb.append(s[l2.get(i)]);
			pr.println(sb);
			sb = new StringBuilder();
			sb.append(s[l11.get(i + 1)]);
			sb.append(' ');
			sb.append(s[l2.get(i + 1)]);
			pr.println(sb);
		}

		for (int size = l2.size(); i < size; i += 4) {
			if (i + 3 < size) {
				StringBuilder sb = new StringBuilder();
				sb.append(s[l2.get(i + 2)]);
				sb.append(' ');
				sb.append(s[l2.get(i + 0)]);
				pr.println(sb);
				sb = new StringBuilder();
				sb.append(s[l2.get(i + 3)]);
				sb.append(' ');
				sb.append(s[l2.get(i + 1)]);
				pr.println(sb);

			}
		}

	}

	static class Pair implements Comparable<Pair> {
		String a;
		int b;

		Pair(StringBuilder ss, int b) {
			this.a = ss.toString();
			this.b = b;
		}

		@Override
		public int compareTo(Pair o) {
			if (a.equals(o.a)) {
				return Integer.compare(b, o.b);
			}

			return a.compareTo(o.a);
		}

		@Override
		public int hashCode() {
			return a.hashCode() + Integer.hashCode(b);
		}

		@Override
		public boolean equals(Object obj) {
			Pair o = (Pair) obj;
			return a.equals(o.a) && b == o.b;
		}

		@Override
		public String toString() {
			// [xxx, xxxx]
			StringBuilder stmp = new StringBuilder(32);
			stmp.append('[');
			stmp.append(a);
			stmp.append(',');
			stmp.append(' ');
			stmp.append(b);
			stmp.append(']');

			return stmp.toString();
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);

		solve();

		pr.close();
		sc.close();
	}

	static class Scanner {
		BufferedReader br;

		Scanner (InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
		}

		private boolean isPrintable(int ch) {
			return ch >= '!' && ch <= '~';
		}

		private boolean isCRLF(int ch) {
			return ch == '\n' || ch == '\r' || ch == -1;
		}

		private int nextPrintable() {
			try {
				int ch;
				while (!isPrintable(ch = br.read())) {
					if (ch == -1) {
						throw new NoSuchElementException();
					}
				}

				return ch;
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		String next() {
			try {
				int ch = nextPrintable();
				StringBuilder sb = new StringBuilder();
				do {
					sb.appendCodePoint(ch);
				} while (isPrintable(ch = br.read()));

				return sb.toString();
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		int nextInt() {
			try {
				// parseInt from Integer.parseInt()
				boolean negative = false;
				int res = 0;
				int limit = -Integer.MAX_VALUE;
				int radix = 10;

				int fc = nextPrintable();
				if (fc < '0') {
					if (fc == '-') {
						negative = true;
						limit = Integer.MIN_VALUE;
					} else if (fc != '+') {
						throw new NumberFormatException();
					}
					fc = br.read();
				}
				int multmin = limit / radix;

				int ch = fc;
				do {
					int digit = ch - '0';
					if (digit < 0 || digit >= radix) {
						throw new NumberFormatException();
					}
					if (res < multmin) {
						throw new NumberFormatException();
					}
					res *= radix;
					if (res < limit + digit) {
						throw new NumberFormatException();
					}
					res -= digit;

				} while (isPrintable(ch = br.read()));

				return negative ? res : -res;
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		long nextLong() {
			try {
				// parseLong from Long.parseLong()
				boolean negative = false;
				long res = 0;
				long limit = -Long.MAX_VALUE;
				int radix = 10;

				int fc = nextPrintable();
				if (fc < '0') {
					if (fc == '-') {
						negative = true;
						limit = Long.MIN_VALUE;
					} else if (fc != '+') {
						throw new NumberFormatException();
					}
					fc = br.read();
				}
				long multmin = limit / radix;

				int ch = fc;
				do {
					int digit = ch - '0';
					if (digit < 0 || digit >= radix) {
						throw new NumberFormatException();
					}
					if (res < multmin) {
						throw new NumberFormatException();
					}
					res *= radix;
					if (res < limit + digit) {
						throw new NumberFormatException();
					}
					res -= digit;

				} while (isPrintable(ch = br.read()));

				return negative ? res : -res;
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		float nextFloat() {
			return Float.parseFloat(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			try {
				int ch;
				while (isCRLF(ch = br.read())) {
					if (ch == -1) {
						throw new NoSuchElementException();
					}
				}
				StringBuilder sb = new StringBuilder();
				do {
					sb.appendCodePoint(ch);
				} while (!isCRLF(ch = br.read()));

				return sb.toString();
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		int[] nextIntArray(int n) {
			int[] ret = new int[n];
			for (int i = 0; i < n; i++) {
				ret[i] = sc.nextInt();
			}

			return ret;
		}

		int[][] nextIntArrays(int n, int m) {
			int[][] ret = new int[m][n];
			for (int i = 0; i < n; i++) {
				for (int j = 0; j < m; j++) {
					ret[j][i] = sc.nextInt();
				}
			}

			return ret;
		}

		void close() {
			try {
				br.close();
			} catch (IOException e) {
//				throw new NoSuchElementException();
			}
		}
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}


import java.io.*;
import java.util.*;

public class Main_Round566Div2_C {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int n = sc.nextInt();

		char[] va = {'a', 'e', 'i', 'o', 'u'};

		String[] s = new String[n];
		StringBuilder[] ss = new StringBuilder[n];
		Pair[] sss = new Pair[n];
		for (int i = 0; i < n; i++) {
			s[i] = sc.next();

			StringBuilder sb = new StringBuilder();
			for (int j = s[i].length() - 1; j >= 0; j--) {
				for (int k = 0; k < 5; k++) {
					if (s[i].charAt(j) == va[k]) {
						if (sb.length() == 0) {
							sb.append(va[k]);
						} else {
							sb.append('?');
						}
						break;
					}
				}
			}

			ss[i] = sb;
			sss[i] = new Pair(ss[i], i);
		}
		Arrays.sort(sss);

//		pr.println(Arrays.toString(ss));
		List<Pair> l1 = new ArrayList<>();
		List<Integer> l2 = new ArrayList<>();
		for (int i = 0; i < n; ) {
			if (i < n - 1 && sss[i].a.toString().equals(sss[i + 1].a.toString())) {
				l2.add(sss[i].b);
				l2.add(sss[i + 1].b);
				i += 2;
			} else {
				sss[i].a.setCharAt(0, '?');
				l1.add(sss[i]);
				i++;
			}
		}
		Collections.sort(l1);
		List<Integer> l11 = new ArrayList<>();
		for (int i = 0, size = l1.size(); i < size; ) {
			if (i < size - 1 && l1.get(i).a.toString().equals(l1.get(i + 1).a.toString())) {
				l11.add(l1.get(i).b);
				l11.add(l1.get(i + 1).b);
				i += 2;
			} else {
				i++;
			}
		}

		int m = Math.min(l2.size(), l11.size()) / 2;
		m += (l2.size() - m) / 4;
		pr.println(m);
		int i;
		for (i = 0; i < Math.min(l2.size(), l11.size()); i += 2) {
			StringBuilder sb = new StringBuilder();
			sb.append(s[l11.get(i)]);
			sb.append(' ');
			sb.append(s[l2.get(i)]);
			pr.println(sb);
			sb = new StringBuilder();
			sb.append(s[l11.get(i + 1)]);
			sb.append(' ');
			sb.append(s[l2.get(i + 1)]);
			pr.println(sb);
		}

		for (int size = l2.size(); i < size; i += 4) {
			if (i + 3 < size) {
				StringBuilder sb = new StringBuilder();
				sb.append(s[l2.get(i + 2)]);
				sb.append(' ');
				sb.append(s[l2.get(i + 0)]);
				pr.println(sb);
				sb = new StringBuilder();
				sb.append(s[l2.get(i + 3)]);
				sb.append(' ');
				sb.append(s[l2.get(i + 1)]);
				pr.println(sb);

			}
		}

	}

	static class Pair implements Comparable<Pair> {
		StringBuilder a;
		int b;

		Pair(StringBuilder ss, int b) {
			this.a = ss;
			this.b = b;
		}

		@Override
		public int compareTo(Pair o) {
			if (a.equals(o.a)) {
				return Integer.compare(b, o.b);
			}

			return a.compareTo(o.a);
		}

		@Override
		public int hashCode() {
			return a.hashCode() + Integer.hashCode(b);
		}

		@Override
		public boolean equals(Object obj) {
			Pair o = (Pair) obj;
			return a.equals(o.a) && b == o.b;
		}

		@Override
		public String toString() {
			// [xxx, xxxx]
			StringBuilder stmp = new StringBuilder(32);
			stmp.append('[');
			stmp.append(a);
			stmp.append(',');
			stmp.append(' ');
			stmp.append(b);
			stmp.append(']');

			return stmp.toString();
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);

		solve();

		pr.close();
		sc.close();
	}

	static class Scanner {
		BufferedReader br;

		Scanner (InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
		}

		private boolean isPrintable(int ch) {
			return ch >= '!' && ch <= '~';
		}

		private boolean isCRLF(int ch) {
			return ch == '\n' || ch == '\r' || ch == -1;
		}

		private int nextPrintable() {
			try {
				int ch;
				while (!isPrintable(ch = br.read())) {
					if (ch == -1) {
						throw new NoSuchElementException();
					}
				}

				return ch;
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		String next() {
			try {
				int ch = nextPrintable();
				StringBuilder sb = new StringBuilder();
				do {
					sb.appendCodePoint(ch);
				} while (isPrintable(ch = br.read()));

				return sb.toString();
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		int nextInt() {
			try {
				// parseInt from Integer.parseInt()
				boolean negative = false;
				int res = 0;
				int limit = -Integer.MAX_VALUE;
				int radix = 10;

				int fc = nextPrintable();
				if (fc < '0') {
					if (fc == '-') {
						negative = true;
						limit = Integer.MIN_VALUE;
					} else if (fc != '+') {
						throw new NumberFormatException();
					}
					fc = br.read();
				}
				int multmin = limit / radix;

				int ch = fc;
				do {
					int digit = ch - '0';
					if (digit < 0 || digit >= radix) {
						throw new NumberFormatException();
					}
					if (res < multmin) {
						throw new NumberFormatException();
					}
					res *= radix;
					if (res < limit + digit) {
						throw new NumberFormatException();
					}
					res -= digit;

				} while (isPrintable(ch = br.read()));

				return negative ? res : -res;
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		long nextLong() {
			try {
				// parseLong from Long.parseLong()
				boolean negative = false;
				long res = 0;
				long limit = -Long.MAX_VALUE;
				int radix = 10;

				int fc = nextPrintable();
				if (fc < '0') {
					if (fc == '-') {
						negative = true;
						limit = Long.MIN_VALUE;
					} else if (fc != '+') {
						throw new NumberFormatException();
					}
					fc = br.read();
				}
				long multmin = limit / radix;

				int ch = fc;
				do {
					int digit = ch - '0';
					if (digit < 0 || digit >= radix) {
						throw new NumberFormatException();
					}
					if (res < multmin) {
						throw new NumberFormatException();
					}
					res *= radix;
					if (res < limit + digit) {
						throw new NumberFormatException();
					}
					res -= digit;

				} while (isPrintable(ch = br.read()));

				return negative ? res : -res;
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		float nextFloat() {
			return Float.parseFloat(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			try {
				int ch;
				while (isCRLF(ch = br.read())) {
					if (ch == -1) {
						throw new NoSuchElementException();
					}
				}
				StringBuilder sb = new StringBuilder();
				do {
					sb.appendCodePoint(ch);
				} while (!isCRLF(ch = br.read()));

				return sb.toString();
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		int[] nextIntArray(int n) {
			int[] ret = new int[n];
			for (int i = 0; i < n; i++) {
				ret[i] = sc.nextInt();
			}

			return ret;
		}

		int[][] nextIntArrays(int n, int m) {
			int[][] ret = new int[m][n];
			for (int i = 0; i < n; i++) {
				for (int j = 0; j < m; j++) {
					ret[j][i] = sc.nextInt();
				}
			}

			return ret;
		}

		void close() {
			try {
				br.close();
			} catch (IOException e) {
//				throw new NoSuchElementException();
			}
		}
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}


import java.io.*;
import java.util.*;

public class Main_Round566Div2_C1 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int n = sc.nextInt();

		char[] va = {'a', 'e', 'i', 'o', 'u'};

		String[] s = new String[n];
		Pair[] sss = new Pair[n];
		for (int i = 0; i < n; i++) {
			s[i] = sc.next();

			char lc = 0;
			int cnt = 0;
			for (int j = s[i].length() - 1; j >= 0; j--) {
				for (int k = 0; k < 5; k++) {
					if (s[i].charAt(j) == va[k]) {
						if (lc == 0) {
							lc = va[k];
						}
						cnt++;
						break;
					}
				}
			}

			sss[i] = new Pair(lc, cnt, i);
		}
		Arrays.sort(sss);

		List<Pair> l1 = new ArrayList<>();
		List<Pair> l2 = new ArrayList<>();
		for (int i = 0; i < n; ) {
			if (i < n - 1 && sss[i].c == sss[i + 1].c && sss[i].a == sss[i + 1].a) {
				l2.add(sss[i]);
				l2.add(sss[i + 1]);
				i += 2;
			} else {
				l1.add(sss[i]);
				i++;
			}
		}
		Collections.sort(l1, (o1, o2) -> {
			return o1.a == o2.a ? Integer.compare(o1.b, o2.b) : Integer.compare(o1.a, o2.a);
		});

		List<Pair> l11 = new ArrayList<>();
		for (int i = 0, size = l1.size(); i < size; ) {
			if (i < size - 1 && l1.get(i).a == l1.get(i + 1).a) {
				l11.add(l1.get(i));
				l11.add(l1.get(i + 1));
				i += 2;
			} else {
				i++;
			}
		}

		int m = Math.min(l2.size(), l11.size()) / 2;
		m += (l2.size() - m * 2) / 4;
		pr.println(m);
		int i;
		for (i = 0; i < Math.min(l2.size(), l11.size()); i += 2) {
			pr.printString2(s[l11.get(i).b], s[l2.get(i).b]);
			pr.printString2(s[l11.get(i + 1).b], s[l2.get(i + 1).b]);
		}

		for (int size = l2.size(); i < size; i += 4) {
			if (i + 3 < size) {
				pr.printString2(s[l2.get(i + 2).b], s[l2.get(i).b]);
				pr.printString2(s[l2.get(i + 3).b], s[l2.get(i + 1).b]);
			}
		}

	}

	static class Pair implements Comparable<Pair> {
		int a;
		int b;
		char c;

		Pair(char c, int a, int b) {
			this.a = a;
			this.b = b;
			this.c = c;
		}

		@Override
		public int compareTo(Pair o) {
			if (c == o.c) {
				if (a == o.a) {
					return Integer.compare(b, o.b);
				}

				return Integer.compare(a, o.a);
			}

			return Character.compare(c, o.c);
		}

		@Override
		public int hashCode() {
			return Character.hashCode(c) + Integer.hashCode(a) + Integer.hashCode(b);
		}

		@Override
		public boolean equals(Object obj) {
			Pair o = (Pair) obj;
			return c == o.c && a == o.a && b == o.b;
		}

		@Override
		public String toString() {
			// [xxx, xxxx]
			StringBuilder stmp = new StringBuilder(32);
			stmp.append('[');
			stmp.append(a);
			stmp.append(',');
			stmp.append(' ');
			stmp.append(b);
			stmp.append(']');

			return stmp.toString();
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);

		solve();

		pr.close();
		sc.close();
	}

	static class Scanner {
		BufferedReader br;

		Scanner (InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
		}

		private boolean isPrintable(int ch) {
			return ch >= '!' && ch <= '~';
		}

		private boolean isCRLF(int ch) {
			return ch == '\n' || ch == '\r' || ch == -1;
		}

		private int nextPrintable() {
			try {
				int ch;
				while (!isPrintable(ch = br.read())) {
					if (ch == -1) {
						throw new NoSuchElementException();
					}
				}

				return ch;
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		String next() {
			try {
				int ch = nextPrintable();
				StringBuilder sb = new StringBuilder();
				do {
					sb.appendCodePoint(ch);
				} while (isPrintable(ch = br.read()));

				return sb.toString();
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		int nextInt() {
			try {
				// parseInt from Integer.parseInt()
				boolean negative = false;
				int res = 0;
				int limit = -Integer.MAX_VALUE;
				int radix = 10;

				int fc = nextPrintable();
				if (fc < '0') {
					if (fc == '-') {
						negative = true;
						limit = Integer.MIN_VALUE;
					} else if (fc != '+') {
						throw new NumberFormatException();
					}
					fc = br.read();
				}
				int multmin = limit / radix;

				int ch = fc;
				do {
					int digit = ch - '0';
					if (digit < 0 || digit >= radix) {
						throw new NumberFormatException();
					}
					if (res < multmin) {
						throw new NumberFormatException();
					}
					res *= radix;
					if (res < limit + digit) {
						throw new NumberFormatException();
					}
					res -= digit;

				} while (isPrintable(ch = br.read()));

				return negative ? res : -res;
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		long nextLong() {
			try {
				// parseLong from Long.parseLong()
				boolean negative = false;
				long res = 0;
				long limit = -Long.MAX_VALUE;
				int radix = 10;

				int fc = nextPrintable();
				if (fc < '0') {
					if (fc == '-') {
						negative = true;
						limit = Long.MIN_VALUE;
					} else if (fc != '+') {
						throw new NumberFormatException();
					}
					fc = br.read();
				}
				long multmin = limit / radix;

				int ch = fc;
				do {
					int digit = ch - '0';
					if (digit < 0 || digit >= radix) {
						throw new NumberFormatException();
					}
					if (res < multmin) {
						throw new NumberFormatException();
					}
					res *= radix;
					if (res < limit + digit) {
						throw new NumberFormatException();
					}
					res -= digit;

				} while (isPrintable(ch = br.read()));

				return negative ? res : -res;
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		float nextFloat() {
			return Float.parseFloat(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			try {
				int ch;
				while (isCRLF(ch = br.read())) {
					if (ch == -1) {
						throw new NoSuchElementException();
					}
				}
				StringBuilder sb = new StringBuilder();
				do {
					sb.appendCodePoint(ch);
				} while (!isCRLF(ch = br.read()));

				return sb.toString();
			} catch (IOException e) {
				throw new NoSuchElementException();
			}
		}

		int[] nextIntArray(int n) {
			int[] ret = new int[n];
			for (int i = 0; i < n; i++) {
				ret[i] = sc.nextInt();
			}

			return ret;
		}

		int[][] nextIntArrays(int n, int m) {
			int[][] ret = new int[m][n];
			for (int i = 0; i < n; i++) {
				for (int j = 0; j < m; j++) {
					ret[j][i] = sc.nextInt();
				}
			}

			return ret;
		}

		void close() {
			try {
				br.close();
			} catch (IOException e) {
//				throw new NoSuchElementException();
			}
		}
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}

		void printInt2(int a, int b) {
			StringBuilder sb = new StringBuilder();
			sb.append(a);
			sb.append(' ');
			sb.append(b);
			println(sb);
		}

		void printString2(String a, String b) {
			StringBuilder sb = new StringBuilder();
			sb.append(a);
			sb.append(' ');
			sb.append(b);
			println(sb);
		}
	}
}


var n = +readline();

function calc() {
    if (n < 4) {
        return [];
    }

    var result = [];
    var second = [];
    var first = [];
    var words = {};

    var vowels = /[aoiue]/g;
    function count(str) {
        var r = str.match(vowels);

        return r;
    }

    for (var i = 0; i < n; i++) {
        var input = readline();
        var r = input.match(vowels);
        var count = r.length;
        var last = r[count - 1];

        if (!words[count]) {
            words[count] = {
                array: []
            };
        }

        var hm = words[count];

        if (!hm[last]) {
            hm[last] = [input];
            hm.array.push(input);
        } else {
            var uniq = true;
            for (var j = 0; j < hm[last].length; j++) {
                var v = hm[last][j];
                if (input !== v) {
                    second.push([input, v]);
                    hm[last].splice(j, 1);
                    hm.array.splice(hm.array.indexOf(v), 1);
                    uniq = false;
                    break;
                }
            }

            if (uniq) {
                hm[last].push(input);
                hm.array.push(input);
            }
        }
    }

    for (var vow in words) {
        var arr = words[vow].array;

        for (var j = 0; j < arr.length - 1; j = j + 2) {
            first.push([arr[j], arr[j + 1]]);
        }
    }

    while (second.length >= 1 && (second.length + first.length) > 1) {
        var fp = null;
        if (first.length) {
            fp = first.pop();
        } else {
            fp = second.pop();
        }

        var sp = second.pop();

        result.append(fp[0] + ' ' + sp[0] + '\n' + fp[1] + ' ' + sp[1]);
    }

    return result;
}

var r = calc();
write(r.length);
write(r.join('\n'));


var n = +readline();

function calc() {
    if (n < 4) {
        return [];
    }

    var result = [];
    var second = [];
    var first = [];
    var words = {};

    var vowels = /[aoiue]/g;
    function count(str) {
        var r = str.match(vowels);

        return r;
    }

    for (var i = 0; i < n; i++) {
        var input = readline();
        var r = input.match(vowels);
        var count = r.length;
        var last = r[count - 1];

        if (!words[count]) {
            words[count] = {
                array: []
            };
        }

        var hm = words[count];

        if (!hm[last]) {
            hm[last] = [input];
            hm.array.push(input);
        } else {
            var uniq = true;
            for (var j = 0; j < hm[last].length; j++) {
                var v = hm[last][j];
                second.push([input, v]);
                hm[last].splice(j, 1);
                hm.array.splice(hm.array.indexOf(v), 1);
                uniq = false;
                break;
            }

            if (uniq) {
                hm[last].push(input);
                hm.array.push(input);
            }
        }
    }

    for (var vow in words) {
        var arr = words[vow].array;

        for (var j = 0; j < arr.length - 1; j = j + 2) {
            first.push([arr[j], arr[j + 1]]);
        }
    }

    while (second.length >= 1 && (second.length + first.length) > 1) {
        var fp = null;
        if (first.length) {
            fp = first.pop();
        } else {
            fp = second.pop();
        }

        var sp = second.pop();

        result.push(fp[0] + ' ' + sp[0] + '\n' + fp[1] + ' ' + sp[1]);
    }

    return result;
}

var r = calc();
write(r.length);
if (r.length) {
    write('\n');
    write(r.join('\n'));
}


var n = +readline();

function calc() {
    if (n < 4) {
        return [];
    }

    var result = [];
    var second = [];
    var first = [];
    var words = {};

    var vowels = /[aoiue]/g;
    function count(str) {
        var r = str.match(vowels);

        return r;
    }

    for (var i = 0; i < n; i++) {
        var input = readline();
        var r = input.match(vowels);
        var count = r.length;
        var last = r[count - 1];

        if (!words[count]) {
            words[count] = {
                array: []
            };
        }

        var hm = words[count];

        if (!hm[last]) {
            hm[last] = [input];
            hm.array.push(input);
        } else {
            var uniq = true;
            for (var j = 0; j < hm[last].length; j++) {
                var v = hm[last][j];
                if (input !== v) {
                    second.push([input, v]);
                    hm[last].splice(j, 1);
                    hm.array.splice(hm.array.indexOf(v), 1);
                    uniq = false;
                    break;
                }
            }

            if (uniq) {
                hm[last].push(input);
                hm.array.push(input);
            }
        }
    }

    for (var vow in words) {
        var arr = words[vow].array;

        for (var j = 0; j < arr.length - 1; j = j + 2) {
            first.push([arr[j], arr[j + 1]]);
        }
    }

    while (second.length >= 1 && (second.length + first.length) > 1) {
        var fp = null;
        if (first.length) {
            fp = first.pop();
        } else {
            fp = second.pop();
        }

        var sp = second.pop();

        result.push(fp[0] + ' ' + sp[0] + '\n' + fp[1] + ' ' + sp[1]);
    }

    return result;
}

var r = calc();
write(r.length);
if (r.length) {
    write('\n');
    write(r.join('\n'));
}


var n = +readline();

function calc() {
    if (n < 4) {
        return [];
    }

    var result = [];
    var second = [];
    var first = [];
    var words = {};

    var vowels = /[aoiue]/g;
    function count(str) {
        var r = str.match(vowels);

        return r;
    }

    for (var i = 0; i < n; i++) {
        var input = readline();
        var r = input.match(vowels);
        var count = r.length;
        var last = r[count - 1];

        if (!words[count]) {
            words[count] = {
                array: []
            };
        }

        var hm = words[count];

        if (!hm[last]) {
            hm[last] = [input];
            hm.array.push(input);
        } else {
            var uniq = true;
            for (var j = 0; j < hm[last].length; j++) {
                var v = hm[last][j];
                if (input !== v) {
                    second.push([input, v]);
                    hm[last].splice(j, 1);
                    hm.array.splice(hm.array.indexOf(v), 1);
                    uniq = false;
                    break;
                }
            }

            if (uniq) {
                hm[last].push(input);
                hm.array.push(input);
            }
        }
    }

    for (var vow in words) {
        var arr = words[vow].array;

        for (var j = 0; j < arr.length - 1; j = j + 2) {
            first.push([arr[j], arr[j + 1]]);
        }
    }

    while (second.length >= 1 && (second.length + first.length) > 1) {
        var fp = null;
        if (first.length) {
            fp = first.pop();
        } else {
            fp = second.pop();
        }

        var sp = second.pop();

        result.push(fp[0] + ' ' + sp[0] + '\n' + fp[1] + ' ' + sp[1]);
    }

    return result;
}

var r = calc();
write(r.length);
write(r.join('\n'));


var g = Number(readline());

var a = [];
var k = "";
var obj = {};
for(i=0;i<g;i++){

	k = readline();
	obj = {};
	obj.str = k;
	obj.count = 0;

	k = k.split("");

	for(l=0;l<k.length;l++){
		if(k[l] == "a" || k[l] == "e" || k[l] == "o" || k[l] == "i" || k[l] == "u"){
			obj.last = k[l];
			obj.count++;
		}
	}

	a.push(obj);
}

var valid = false;

for(i=0;i<a.length;i++){
    valid = false;
    for(b=0;b<a.length;b++){
        if(i==b)
            continue;

        if(a[i].count == a[b].count)
            valid = true;
    }

    if(!valid){
        for(b=0;b<a.length;b++){
            if(i==b)
                continue;

            if(a[i].count == a[b].count && a[i].last == a[b].last)
                valid = true;
        }
    }

    if(!valid)
        a[i] = false;
}

var obj2 = {};

var stroka1 = [];
var stroka2 = [];

var word_c = a.length;

var storfs = [];
while(word_c){

	stroka1 = [];
	stroka2 = [];
	for(i=0;i<a.length;i++){

		if(a[i] == false)
			continue;

		obj = a[i];

		for(b=0;b<a.length;b++){

			if(a[b] == false)
				continue;

			if(i == b)
				continue;

			obj2 = a[b];

			if(obj.last == obj2.last && obj.count == obj2.count){
				a[i] = false;
				a[b] = false;

				stroka1.push(obj.str);
				stroka2.push(obj2.str);
				word_c -= 2;

				break;
			}
		}
		if(stroka1.length)
			break;
	}

    if(stroka1.length){
        	for(i=0;i<a.length;i++){
		if(a[i] == false)
			continue;

		obj = a[i];

		for(b=0;b<a.length;b++){

			if(a[b] == false)
				continue;

			if(i == b)
				continue;

			obj2 = a[b];

			if(obj.count == obj2.count){

				a[i] = false;
				a[b] = false;

				stroka1.unshift(obj.str);
				stroka2.unshift(obj2.str);
				word_c -= 2;

				break;
			}
		}
		if(stroka1.length == 2)
			break;
	}
    }

	if(stroka1.length && stroka2.length){
		storfs.push([stroka1, stroka2]);
	}else{
		word_c = false;
	}
}

print(storfs.length);
for(i=0;i<storfs.length;i++){
	print(storfs[i][0].join(" "));
	print(storfs[i][1].join(" "));
}


var g = Number(readline());

var a = [];
var k = "";
var obj = {};
var obj2 = {};
for(i=0;i<g;i++){

	k = readline();
	obj = {};
	obj.str = k;
	obj.count = 0;

	k = k.split("");

	for(l=0;l<k.length;l++){
		if(k[l] == "a" || k[l] == "e" || k[l] == "o" || k[l] == "i" || k[l] == "u"){
			obj.last = k[l];
			obj.count++;
		}
	}

	a.push(obj);
}

var stroka1_two = [];
var stroka2_two = [];
var stroka1 = [];
var stroka2 = [];

for(i=0;i<a.length;i++){
    if(a[i] === false)
        continue;
    for(b=0;b<a.length;b++){

        if(a[b] === false)
            continue;

        if(i==b)
            continue;

        if(a[i].last == a[b].last && a[i].count == a[b].count){
            stroka1_two.push(a[i].str);
            stroka2_two.push(a[b].str);

            a[b] = false;
            a[i] = false;
            break;
        }
    }
}

for(i=0;i<a.length;i++){
    if(a[i] === false)
        continue;
    for(b=0;b<a.length;b++){

        if(a[b] === false)
            continue;

        if(i==b)
            continue;

        if(a[i].count == a[b].count){
            stroka1.push(a[i].str);
            stroka2.push(a[b].str);

            a[b] = false;
            a[i] = false;
            break;
        }
    }
}

var strofa = [];

for(i=0;i<stroka1_two.length;i++){
    if(typeof stroka1[i] != "undefined"){
        strofa.push([stroka1[i]+" "+stroka1_two[i], stroka2[i]+" "+stroka2_two[i]]);
    }else if(typeof stroka1_two[i+1] != "undefined"){
        strofa.push([stroka1_two[i]+" "+stroka1_two[i+1], stroka2_two[i]+" "+stroka2_two[i+1]])
        i++;
    }
}
print(strofa.length);

for(i=0;i<strofa.length;i++){
    print(strofa[i][0]);
    print(strofa[i][1]);
}


var g = Number(readline());

var a = [];
var k = "";
var obj = {};
for(i=0;i<g;i++){

	k = readline();
	obj = {};
	obj.str = k;
	obj.count = 0;

	k = k.split("");

	for(l=0;l<k.length;l++){
		if(k[l] == "a" || k[l] == "e" || k[l] == "o" || k[l] == "i" || k[l] == "u"){
			obj.last = k[l];
			obj.count++;
		}
	}

	a.push(obj);
}

var obj2 = {};

var stroka1 = [];
var stroka2 = [];

var word_c = a.length;

var storfs = [];
while(word_c){

	stroka1 = [];
	stroka2 = [];
	for(i=0;i<a.length;i++){

		if(a[i] == false)
			continue;

		obj = a[i];

		for(b=0;b<a.length;b++){

			if(a[b] == false)
				continue;

			if(i == b)
				continue;

			obj2 = a[b];

			if(obj.last == obj2.last && obj.count == obj2.count){
				a[i] = false;
				a[b] = false;

				stroka1.push(obj.str);
				stroka2.push(obj2.str);
				word_c -= 2;

				break;
			}
		}
		if(stroka1.length)
			break;
	}

    if(stroka1.length){
        	for(i=0;i<a.length;i++){
		if(a[i] == false)
			continue;

		obj = a[i];

		for(b=0;b<a.length;b++){

			if(a[b] == false)
				continue;

			if(i == b)
				continue;

			obj2 = a[b];

			if(obj.count == obj2.count){

				a[i] = false;
				a[b] = false;

				stroka1.unshift(obj.str);
				stroka2.unshift(obj2.str);
				word_c -= 2;

				break;
			}
		}
		if(stroka1.length == 2)
			break;
	}
    }

	if(stroka1.length && stroka2.length){
		storfs.push([stroka1, stroka2]);
	}else{
		word_c = false;
	}
}

print(storfs.length);
for(i=0;i<storfs.length;i++){
	print(storfs[i][0].join(" "));
	print(storfs[i][1].join(" "));
}


var g = Number(readline());

var a = [];
var k = "";
var obj = {};
for(i=0;i<g;i++){

	k = readline();
	obj = {};
	obj.str = k;
	obj.count = 0;

	k = k.split("");

	for(l=0;l<k.length;l++){
		if(k[l] == "a" || k[l] == "e" || k[l] == "o" || k[l] == "i" || k[l] == "u"){
			obj.last = k[l];
			obj.count++;
		}
	}

	a.push(obj);
}

var obj2 = {};

var stroka1 = [];
var stroka2 = [];

var word_c = a.length;

var storfs = [];
while(word_c){

	stroka1 = [];
	stroka2 = [];
	for(i=0;i<a.length;i++){

		if(a[i] == false)
			continue;

		obj = a[i];

		for(b=0;b<a.length;b++){

			if(a[b] == false)
				continue;

			if(i == b)
				continue;

			obj2 = a[b];

			if(obj.last == obj2.last && obj.count == obj2.count){
				a[i] = false;
				a[b] = false;

				stroka1.push(obj.str);
				stroka2.push(obj2.str);
				word_c -= 2;

				break;
			}
		}
		if(stroka1.length)
			break;
	}

    if(stroka1.length == 0)
        continue;

	for(i=0;i<a.length;i++){
		if(a[i] == false)
			continue;

		obj = a[i];

		for(b=0;b<a.length;b++){

			if(a[b] == false)
				continue;

			if(i == b)
				continue;

			obj2 = a[b];

			if(obj.count == obj2.count){

				a[i] = false;
				a[b] = false;

				stroka1.unshift(obj.str);
				stroka2.unshift(obj2.str);
				word_c -= 2;

				break;
			}
		}
		if(stroka1.length == 2)
			break;
	}

	if(stroka1.length && stroka2.length){
		storfs.push([stroka1, stroka2]);
	}else{
		word_c = false;
	}
}

print(storfs.length);
for(i=0;i<storfs.length;i++){
	print(storfs[i][0].join(" "));
	print(storfs[i][1].join(" "));
}


var g = Number(readline());

var k = "";
var obj = {};
var obj2 = {};

var words = {};

for(i=0;i<g;i++){

	k = readline();
	obj = {};
	obj.str = k;
	obj.count = 0;

	k = k.split("");

	for(l=0;l<k.length;l++){
		if(k[l] == "a" || k[l] == "e" || k[l] == "o" || k[l] == "i" || k[l] == "u"){
			obj.last = k[l];
			obj.count++;
		}
	}

	if(!words.hasOwnProperty(obj.count))
	    words[obj.count] = {};

    if(!Array.isArray(words[obj.count][obj.last]))
        words[obj.count][obj.last] = [];

    words[obj.count][obj.last].push(obj.str);

}

var comp_duos = [];
var semi_comp_duos = [];

for(key in words){

    var cont = words[key];

    for(syl in cont){

        while(cont[syl].length >= 2){
            var first = cont[syl].pop();
            var second = cont[syl].pop();

            comp_duos.push([first, second]);
        }
    }

    var semi_comp = [];

    for(syl in cont){
        for(i=0;i<cont[syl].length;i++){
            semi_comp.push(cont[syl][i]);
        }

        cont[syl] = [];
    }

    while(semi_comp.length >= 2){
        var first = semi_comp.pop();
        var second = semi_comp.pop();

        semi_comp_duos.push([first, second]);
    }

}

var lyrics = [];

while(comp_duos.length != 0 && semi_comp_duos.length != 0){

    var semi_comp_duo = semi_comp_duos.pop();
    var comp_duo = comp_duos.pop();

    lyrics.push([semi_comp_duo[0], comp_duo[0]]);
    lyrics.push([semi_comp_duo[1], comp_duo[1]]);
}

while(comp_duos.length >= 2){
    var comp_duo1 = comp_duos.pop();
    var comp_duo2 = comp_duos.pop();

    lyrics.push([comp_duo1[0], comp_duo2[0]]);
    lyrics.push([comp_duo1[1], comp_duo2[1]]);
}

print(lyrics.length/2);
for(i= 0;i<lyrics.length;i++){
    var lyr = lyrics[i];

    print(lyr[0] + " " + lyr[1]);
}


//\\..........torque.............\\//
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
//find_by_order(k): It returns to an iterator to the kth element (counting from zero) in the set
//order_of_key(k) : It returns to the number of items that are strictly smaller than our item k
#define pb push_back
#define f first
#define s second
#define F(i,a,b) for(i=a;i<b;i++)
#define nl   "\n"
#define sp   " "
#define all(c) (c).begin(),(c).end()
#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
typedef long double ld;
typedef long long   ll;
typedef vector<ll>  vll;
typedef pair<ll,ll> pll;
typedef vector<pll> vpll;
#define rev(i,b,a) for(int i=b;i>=a;i--)
#define  iota  cout<<-1<<nl
#define   cty  cout<<"YES"<<nl
#define ctn   cout<<"NO"<<nl
#define   lmax  LLONG_MAX
#define   lmin  LLONG_MIN
#define csp(x) cout<<(x)<<" "
#define c1(x) cout<<(x)<<nl
#define c2(x,y) cout<<(x)<<" "<<(y)<<nl
#define c3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<nl
#define c4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<nl
#define c5(a,b,c,d,e) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<nl
#define c6(a,b,c,d,e,f) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<" "<<(f)<<nl
#define sz(v) (v).size()
const int mod=1e9+7;
const double pi=3.14159265358979323846264338327950288419716939937510582097494459230;
// priority_queue<t>

ll modI(ll a, ll m)
{
    ll m0=m,y=0,x=1;
    if(m==1) return 0;
    while(a>1)
    {
        ll q=a/m;
        ll t=m;
        m=a%m;
        a=t;
        t=y;
        y=x-q*y;
        x=t;
    }
    if(x<0) x+=m0;
    return x;
}
ll powm(ll a, ll b) {
	ll res=1;
	while(b) {
		if(b&1)
			res=(res*a)%mod;
		a=(a*a)%mod;
		b>>=1;
	}
	return res;
}
//*******************************************************************************************************************************************//
void solve()
{ ll i,j,x=0,y,n,l,r,d,cnt;
 cin>>n;
 vector<string>v(n);
 map<pair<ll,ll>,vll>m;
 map<ll,vll>m1;
 F(i,0,n){cin>>v[i];
          char ch;
          cnt=0;
          for(auto u:v[i])
              if(u=='a'||u=='e'||u=='i'||u=='o'||u=='u')
                cnt++,ch=u;
          m[{ch,cnt}].pb(i);
          m1[cnt].pb(i);
          }
 auto it=m1.begin();
 cnt=0;
 while(it!=m1.end())
 {
     auto temp=it->s;
     cnt+=sz(temp)/2;
     it++;
 }
 d=cnt/2;
 auto it1=m.begin();
 vpll used;
 bool fr[n]={0};
 while(it1!=m.end())
 {
          auto temp=it1->s;
    x=temp.size();
  x/=2;
     for(i=0;i<x;i+=2)
             if(d>0)
         fr[temp[i]]=1,fr[temp[i+1]]=1,used.pb({temp[i],temp[i+1]}),d--;
     it1++;

 }
 vpll faltu;
  it=m1.begin();
 while(it!=m1.end())
 {
     auto temp=it->s;
      x=sz(temp);
     vll temp1;
     for(i=0;i<x;i++)
           if(!fr[temp[i]])
         temp1.pb(temp[i]);
     x=sz(temp1);
      for(i=0;i<x;i+=2)
          faltu.pb({temp1[i],temp1[i+1]});

         it++;

 }
 d=min(sz(faltu),sz(used));
 c1(d);
 for(i=0;i<d;i++)
     c2(v[faltu[i].f],v[used[i].f]),c2(v[faltu[i].s],v[used[i].s]);

};
int main()
{fast;
    int t;
t=1;
//cin >>t;
 while(t--)
     solve();
}